Skip to content

Commit

Permalink
Add antispam (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb authored Dec 31, 2024
1 parent 512772f commit c9499ca
Show file tree
Hide file tree
Showing 7 changed files with 749 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/game/Anticheat/Anticheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ AnticheatManager* GetAnticheatLib()
#include "World.h"
#include "WorldSession.h"

#include "Antispam/Antispam.h"
#include "MovementAnticheat/MovementAnticheat.h"
#include "WardenAnticheat/Warden.hpp"
#include "WardenAnticheat/WardenScanMgr.hpp"
Expand All @@ -50,6 +51,10 @@ AnticheatManager::~AnticheatManager()

void AnticheatManager::LoadAnticheatData()
{
sLog.Out(LOG_ANTICHEAT, LOG_LVL_MINIMAL, "");
sLog.Out(LOG_ANTICHEAT, LOG_LVL_MINIMAL, "Loading antispam system ...");
sAntispam->loadConfig();

sLog.Out(LOG_ANTICHEAT, LOG_LVL_MINIMAL, "");
sLog.Out(LOG_ANTICHEAT, LOG_LVL_MINIMAL, "Loading warden checks...");
sWardenScanMgr.LoadFromDB();
Expand Down
5 changes: 3 additions & 2 deletions src/game/Anticheat/Anticheat.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ class AnticheatManager
~AnticheatManager();
void LoadAnticheatData();

Warden * CreateWardenFor(WorldSession* client, BigNumber* K);
Warden* CreateWardenFor(WorldSession* client, BigNumber* K);
MovementAnticheat* CreateAnticheatFor(Player* player);

AntispamInterface* GetAntispam() const;

void StartWardenUpdateThread();
void StopWardenUpdateThread();
void UpdateWardenSessions();
Expand All @@ -106,7 +108,6 @@ class AnticheatManager

public:
// Antispam wrappers
AntispamInterface* GetAntispam() const { return nullptr; }
bool CanWhisper(AccountPersistentData const& data, MasterPlayer* player) { return true; }

static AnticheatManager* instance();
Expand Down
Loading

0 comments on commit c9499ca

Please sign in to comment.