Skip to content

Commit e7143a6

Browse files
committed
Add Antispam.
1 parent 77deeae commit e7143a6

7 files changed

Lines changed: 787 additions & 2 deletions

File tree

src/game/Anticheat/Anticheat.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ AnticheatManager* GetAnticheatLib()
2929

3030
#include "World.h"
3131
#include "WorldSession.h"
32-
32+
#include "Antispam/Antispam.h"
3333
#include "MovementAnticheat/MovementAnticheat.h"
3434
#include "WardenAnticheat/Warden.hpp"
3535
#include "WardenAnticheat/WardenScanMgr.hpp"
@@ -49,6 +49,10 @@ AnticheatManager::~AnticheatManager()
4949

5050
void AnticheatManager::LoadAnticheatData()
5151
{
52+
sLog.Out(LOG_ANTICHEAT, LOG_LVL_MINIMAL, "");
53+
sLog.Out(LOG_ANTICHEAT, LOG_LVL_MINIMAL, "Loading antispam system ...");
54+
sAntispam->loadConfig();
55+
5256
#if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_5_1
5357
sLog.Out(LOG_ANTICHEAT, LOG_LVL_MINIMAL, "");
5458
sLog.Out(LOG_ANTICHEAT, LOG_LVL_MINIMAL, "Loading warden checks...");
@@ -190,3 +194,7 @@ void AnticheatManager::RemoveWardenSession(Warden* warden)
190194
m_wardenSessionsToRemove.push_back(warden);
191195
}
192196

197+
AntispamInterface* AnticheatManager::GetAntispam() const
198+
{
199+
return sAntispam;
200+
}

src/game/Anticheat/Anticheat.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class AntispamInterface
7373
virtual void showMuted(WorldSession* session) {}
7474
};
7575

76+
#include "Antispam/Antispam.h"
7677
#include "WardenAnticheat/Warden.hpp"
7778
#include "MovementAnticheat/MovementAnticheat.h"
7879
#include "ace/Thread_Mutex.h"
@@ -97,6 +98,7 @@ class AnticheatManager
9798

9899
Warden * CreateWardenFor(WorldSession* client, BigNumber* K);
99100
MovementAnticheat* CreateAnticheatFor(Player* player);
101+
AntispamInterface* GetAntispam() const;
100102

101103
void StartWardenUpdateThread();
102104
void StopWardenUpdateThread();
@@ -117,7 +119,6 @@ class AnticheatManager
117119

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

123124
static AnticheatManager* instance();

0 commit comments

Comments
 (0)