Skip to content

Commit

Permalink
Merge branch 'repack22' into devcopy2
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb authored Jun 23, 2023
2 parents a299795 + 4ba5d4f commit 1c2eac1
Show file tree
Hide file tree
Showing 7 changed files with 756 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/game/Anticheat/Anticheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,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 @@ -51,6 +52,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 Expand Up @@ -179,4 +184,9 @@ void AnticheatManager::RemoveWardenSession(Warden* warden)
m_wardenSessionsToRemove.push_back(warden);
}

AntispamInterface* AnticheatManager::GetAntispam() const
{
return sAntispam;
}

#endif
7 changes: 5 additions & 2 deletions src/game/Anticheat/Anticheat.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,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 Down Expand Up @@ -166,6 +168,8 @@ class AnticheatManager
return new MovementAnticheat();
}

AntispamInterface* GetAntispam() const { return nullptr; }

void StartWardenUpdateThread() {}
void StopWardenUpdateThread() {}
void UpdateWardenSessions() {}
Expand All @@ -175,7 +179,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 1c2eac1

Please sign in to comment.