feat: Added logs_ip_action + more (#1157)

This commit is contained in:
Nefertumm
2019-02-08 19:52:22 -03:00
committed by Francesco Borzì
parent 6750fd5a73
commit 2a71b2a666
19 changed files with 564 additions and 45 deletions

View File

@@ -8,6 +8,7 @@
#include "DatabaseEnv.h"
#include "ObjectAccessor.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "Util.h"
#include "SHA1.h"
#include "WorldSession.h"
@@ -149,10 +150,16 @@ namespace AccountMgr
std::string username;
if (!GetName(accountId, username))
{
sScriptMgr->OnFailedPasswordChange(accountId);
return AOR_NAME_NOT_EXIST; // account doesn't exist
}
if (utf8length(newPassword) > MAX_ACCOUNT_STR)
{
sScriptMgr->OnFailedEmailChange(accountId);
return AOR_PASS_TOO_LONG;
}
normalizeString(username);
normalizeString(newPassword);
@@ -164,6 +171,7 @@ namespace AccountMgr
LoginDatabase.Execute(stmt);
sScriptMgr->OnPasswordChange(accountId);
return AOR_OK;
}