Toxic features and improve protections (#897)

This commit is contained in:
maybegreat48
2023-01-22 21:57:32 +00:00
committed by GitHub
parent ee99333f7e
commit 8173adb87f
58 changed files with 7912 additions and 6674 deletions

View File

@ -32,6 +32,13 @@ namespace big
});
}
if (notify)
{
char notification[500]{}; // I don't like using sprintf but there isn't an alternative afaik
snprintf(notification, sizeof(notification), m_notify_message, attacker->get_name(), victim->get_name());
g_notification_service->push_warning("Protections", notification);
}
process_common(attacker);
}
}

View File

@ -18,13 +18,6 @@ namespace big
void reaction::process_common(player_ptr player)
{
if (notify)
{
char notification[500]{}; // I don't like using sprintf but there isn't an alternative afaik
snprintf(notification, sizeof(notification), m_notify_message, player->get_name());
g_notification_service->push_warning("Protections", notification);
}
if (log)
{
uint64_t rockstar_id = player->get_net_data() == nullptr ? 0 : player->get_net_data()->m_gamer_handle_2.m_rockstar_id;
@ -71,6 +64,13 @@ namespace big
});
}
if (notify)
{
char notification[500]{}; // I don't like using sprintf but there isn't an alternative afaik
snprintf(notification, sizeof(notification), m_notify_message, player->get_name());
g_notification_service->push_warning("Protections", notification);
}
process_common(player);
}
}

View File

@ -13,7 +13,7 @@ namespace big
public:
bool announce_in_chat = false;
bool notify = true;
bool log = false;
bool log = true;
bool add_to_player_db = false;
bool block_joins = false;
bool kick = false;