Rewrite(Core/BanManager): Rewrite Ban system (#1576)
* Added ban manager * Delete ban functions in world class * Separate ban account to (ban account, ban ip, ban character) * Support world announce
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "Util.h"
|
||||
#include "Warden.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "BanManager.h"
|
||||
|
||||
Warden::Warden() : _session(NULL), _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0),
|
||||
_dataSent(false), _previousTimestamp(0), _module(NULL), _initialized(false)
|
||||
@@ -227,7 +228,7 @@ std::string Warden::Penalty(WardenCheck* check /*= NULL*/, uint16 checkFailed /*
|
||||
duration << sWorld->getIntConfig(CONFIG_WARDEN_CLIENT_BAN_DURATION) << "s";
|
||||
std::string accountName;
|
||||
AccountMgr::GetName(_session->GetAccountId(), accountName);
|
||||
sWorld->BanAccount(BAN_ACCOUNT, accountName, ((longBan && false /*ZOMG!*/) ? "1209600s" : duration.str()), banReason, "Server");
|
||||
sBan->BanAccount(accountName, ((longBan && false /*ZOMG!*/) ? "1209600s" : duration.str()), banReason, "Server");
|
||||
|
||||
return "Ban";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user