This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/hooks/protections/increment_stat_event.cpp

34 lines
955 B
C++
Raw Normal View History

#include "hooking.hpp"
2022-12-06 16:12:02 +00:00
#include "gta/net_game_event.hpp"
#include <network/CNetGamePlayer.hpp>
namespace big
{
bool hooks::increment_stat_event(CNetworkIncrementStatEvent* net_event, CNetGamePlayer* sender)
{
switch (net_event->m_stat)
{
case RAGE_JOAAT("MPPLY_BAD_CREW_STATUS"):
case RAGE_JOAAT("MPPLY_BAD_CREW_MOTTO"):
case RAGE_JOAAT("MPPLY_BAD_CREW_NAME"):
case RAGE_JOAAT("MPPLY_BAD_CREW_EMBLEM"):
case RAGE_JOAAT("MPPLY_EXPLOITS"):
case RAGE_JOAAT("MPPLY_GAME_EXPLOITS"):
case RAGE_JOAAT("MPPLY_TC_ANNOYINGME"):
case RAGE_JOAAT("MPPLY_TC_HATE"):
case RAGE_JOAAT("MPPLY_VC_ANNOYINGME"):
case RAGE_JOAAT("MPPLY_VC_HATE"):
2022-10-24 14:08:37 +02:00
const auto report = std::format("From: {}", sender->get_name());
if (g.notifications.reports.log)
LOG(INFO) << "Blocked report; " << report;
if (g.notifications.reports.notify)
g_notification_service->push_warning("BLOCKED REPORT", report);
return true;
}
return false;
}
}