Configuration/ConfigMgr: converted from singleton to namespace with free functions.

This commit is contained in:
Spp
2011-09-28 13:00:43 +02:00
parent 71228f90bb
commit be12603150
15 changed files with 447 additions and 457 deletions

View File

@@ -639,7 +639,7 @@ bool AuthSocket::_HandleLogonProof()
sLog->outBasic("[AuthChallenge] account %s tried to login with wrong password!", _login.c_str());
uint32 MaxWrongPassCount = sConfig->GetIntDefault("WrongPass.MaxCount", 0);
uint32 MaxWrongPassCount = ConfigMgr::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
@@ -656,8 +656,8 @@ bool AuthSocket::_HandleLogonProof()
if (failed_logins >= MaxWrongPassCount)
{
uint32 WrongPassBanTime = sConfig->GetIntDefault("WrongPass.BanTime", 600);
bool WrongPassBanType = sConfig->GetBoolDefault("WrongPass.BanType", false);
uint32 WrongPassBanTime = ConfigMgr::GetIntDefault("WrongPass.BanTime", 600);
bool WrongPassBanType = ConfigMgr::GetBoolDefault("WrongPass.BanType", false);
if (WrongPassBanType)
{