diff options
author | Subv <subv2112@gmail.com> | 2014-06-23 16:35:54 -0500 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2014-06-23 16:35:54 -0500 |
commit | 0db743c4ff2885ae51319c897158cc8774b41a88 (patch) | |
tree | 06b1e7950dac31b879ae7802d40b7493b0c61ec4 /src/server/authserver/Server/AuthSession.cpp | |
parent | 28b61812cf0d87b84aefaa0889844b6288f93b93 (diff) | |
parent | aa93a975469cca56e35adc1b5b501f4536be61f1 (diff) |
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
Diffstat (limited to 'src/server/authserver/Server/AuthSession.cpp')
-rw-r--r-- | src/server/authserver/Server/AuthSession.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp index 304d593fa3d..5b56a99d640 100644 --- a/src/server/authserver/Server/AuthSession.cpp +++ b/src/server/authserver/Server/AuthSession.cpp @@ -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); |