Core/Config: Refactored ConfigMgr

* Loading initial configuration files is now separate from loading any additional custom configs
This commit is contained in:
Shauren
2013-07-15 17:31:44 +02:00
parent baeecba6c9
commit 779a59e7e2
16 changed files with 470 additions and 424 deletions

View File

@@ -682,7 +682,7 @@ bool AuthSocket::_HandleLogonProof()
TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
uint32 MaxWrongPassCount = ConfigMgr::GetIntDefault("WrongPass.MaxCount", 0);
uint32 MaxWrongPassCount = sConfigMgr->GetIntDefault("WrongPass.MaxCount", 0);
if (MaxWrongPassCount > 0)
{
//Increment number of failed logins by one and if it reaches the limit temporarily ban that account or IP
@@ -699,8 +699,8 @@ bool AuthSocket::_HandleLogonProof()
if (failed_logins >= MaxWrongPassCount)
{
uint32 WrongPassBanTime = ConfigMgr::GetIntDefault("WrongPass.BanTime", 600);
bool WrongPassBanType = ConfigMgr::GetBoolDefault("WrongPass.BanType", false);
uint32 WrongPassBanTime = sConfigMgr->GetIntDefault("WrongPass.BanTime", 600);
bool WrongPassBanType = sConfigMgr->GetBoolDefault("WrongPass.BanType", false);
if (WrongPassBanType)
{