mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-15 13:35:08 +00:00
refactor(Core): code cleanup (part 3) (#6380)
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include <openssl/md5.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
Warden::Warden() : _session(nullptr), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0),
|
||||
@@ -281,7 +280,7 @@ bool Warden::ProcessLuaCheckResponse(std::string const& msg)
|
||||
{
|
||||
static constexpr char WARDEN_TOKEN[] = "_TW\t";
|
||||
// if msg starts with WARDEN_TOKEN
|
||||
if (!(msg.rfind(WARDEN_TOKEN, 0) == 0))
|
||||
if (msg.rfind(WARDEN_TOKEN, 0) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "Database/DatabaseEnv.h"
|
||||
#include "Log.h"
|
||||
#include "Util.h"
|
||||
#include "Warden.h"
|
||||
#include "WardenCheckMgr.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
WardenCheckMgr::WardenCheckMgr()
|
||||
@@ -128,9 +126,9 @@ void WardenCheckMgr::LoadWardenChecks()
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string str = fmt::sprintf("%04u", id);
|
||||
ASSERT(str.size() == 4);
|
||||
std::copy(str.begin(), str.end(), wardenCheck.IdStr.begin());
|
||||
std::string str2 = Acore::StringFormat("%04u", id);
|
||||
ASSERT(str2.size() == 4);
|
||||
std::copy(str2.begin(), str2.end(), wardenCheck.IdStr.begin());
|
||||
|
||||
CheckIdPool[WARDEN_CHECK_LUA_TYPE].push_back(id);
|
||||
break;
|
||||
|
||||
@@ -5,15 +5,12 @@
|
||||
*/
|
||||
|
||||
#include "ByteBuffer.h"
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "SessionKeyGenerator.h"
|
||||
#include "Util.h"
|
||||
#include "WardenMac.h"
|
||||
#include "WardenModuleMac.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include <openssl/md5.h>
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#include "AccountMgr.h"
|
||||
#include "ByteBuffer.h"
|
||||
#include "Common.h"
|
||||
#include "CryptoRandom.h"
|
||||
#include "Database/DatabaseEnv.h"
|
||||
#include "HMAC.h"
|
||||
#include "Log.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "SessionKeyGenerator.h"
|
||||
|
||||
Reference in New Issue
Block a user