Merge branch 'master' of github.com:TrinityCore/TrinityCore into boost

Conflicts:
	src/server/authserver/Server/AuthSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/shared/Packets/ByteBuffer.cpp
	src/server/shared/Utilities/Util.h
This commit is contained in:
Subv committed 2014-06-23 16:35:54 -05:00
commit 0db743c4ff
449 files changed
+22871 -3837

No files matched your search

+13 -1
View File
@@ -593,10 +593,22 @@ bool AuthSession::_HandleLogonProof()
GetRemoteIpAddress().c_str(), GetRemotePort(), _login.c_str());
uint32 MaxWrongPassCount = sConfigMgr->GetIntDefault("WrongPass.MaxCount", 0);
// We can not include the failed account login hook. However, this is a workaround to still log this.
if (sConfigMgr->GetBoolDefault("Additional.IP.Based.Login.Logging", false))
{
PreparedStatement* logstmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FALP_IP_LOGGING);
logstmt->setString(0, _login);
logstmt->setString(1, socket().getRemoteAddress());
logstmt->setString(2, "Logged on failed AccountLogin due wrong password");
LoginDatabase.Execute(logstmt);
}
if (MaxWrongPassCount > 0)
{
//Increment number of failed logins by one and if it reaches the limit temporarily ban that account or IP
PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_FAILEDLOGINS);
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_FAILEDLOGINS);
stmt->setString(0, _login);
LoginDatabase.Execute(stmt);