mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Bnet: Moved expiring bans to background task running every minute by default (configurable) - no longer executed during login.
This commit is contained in:
@@ -615,18 +615,6 @@ void Battlenet::Session::Start()
|
||||
std::string ip_address = GetRemoteIpAddress().to_string();
|
||||
TC_LOG_TRACE("session", "Accepted connection from %s", ip_address.c_str());
|
||||
|
||||
if (_queryCallback)
|
||||
{
|
||||
Authentication::LogonResponse* logonResponse = new Authentication::LogonResponse();
|
||||
logonResponse->SetAuthResult(AUTH_LOGON_TOO_FAST);
|
||||
AsyncWrite(logonResponse);
|
||||
TC_LOG_DEBUG("session", "[Session::Start] %s attempted to log too quick after previous attempt!", GetClientInfo().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
// Verify that this IP is not in the ip_banned table
|
||||
LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS));
|
||||
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_INFO);
|
||||
stmt->setString(0, ip_address);
|
||||
stmt->setUInt32(1, inet_addr(ip_address.c_str()));
|
||||
@@ -827,9 +815,6 @@ bool Battlenet::Session::HandlePasswordModule(BitStream* dataStream, ServerPacke
|
||||
return false;
|
||||
}
|
||||
|
||||
//set expired game account bans to inactive
|
||||
LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS));
|
||||
|
||||
BigNumber M;
|
||||
sha.Initialize();
|
||||
sha.UpdateBigNumbers(&A, &M1, &K, NULL);
|
||||
|
||||
Reference in New Issue
Block a user