mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-24 01:22:23 +08:00
More player database improvements (#1725)
This commit is contained in:
@ -1,11 +1,17 @@
|
||||
#include "hooking.hpp"
|
||||
#include "services/player_database/player_database_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
inline bool block_session_presence()
|
||||
{
|
||||
return g.protections.rid_join || (g_player_database_service && g_player_database_service->is_redirect_join_active());
|
||||
}
|
||||
|
||||
bool hooks::update_presence_attribute_int(void* presence_data, int profile_index, char* attr, std::uint64_t value)
|
||||
{
|
||||
auto hash = rage::joaat(attr);
|
||||
if (g.protections.rid_join && (hash == RAGE_JOAAT("gstok") || hash == RAGE_JOAAT("gsid") || hash == RAGE_JOAAT("gstype") || hash == RAGE_JOAAT("gshost") || hash == RAGE_JOAAT("gsjoin")))
|
||||
if (block_session_presence() && (hash == RAGE_JOAAT("gstok") || hash == RAGE_JOAAT("gsid") || hash == RAGE_JOAAT("gstype") || hash == RAGE_JOAAT("gshost") || hash == RAGE_JOAAT("gsjoin")))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -16,7 +22,7 @@ namespace big
|
||||
bool hooks::update_presence_attribute_string(void* presence_data, int profile_index, char* attr, char* value)
|
||||
{
|
||||
auto hash = rage::joaat(attr);
|
||||
if (g.protections.rid_join && hash == RAGE_JOAAT("gsinfo"))
|
||||
if (block_session_presence() && hash == RAGE_JOAAT("gsinfo"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user