mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8337] Fixed typo in function name. Other cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
6b25da27dd
commit
d7b091793c
7 changed files with 36 additions and 36 deletions
|
|
@ -38,8 +38,8 @@ AccountOpResult AccountMgr::CreateAccount(std::string username, std::string pass
|
|||
if(utf8length(username) > MAX_ACCOUNT_STR)
|
||||
return AOR_NAME_TOO_LONG; // username's too long
|
||||
|
||||
normilizeString(username);
|
||||
normilizeString(password);
|
||||
normalizeString(username);
|
||||
normalizeString(password);
|
||||
|
||||
loginDatabase.escape_string(username);
|
||||
loginDatabase.escape_string(password);
|
||||
|
|
@ -118,8 +118,8 @@ AccountOpResult AccountMgr::ChangeUsername(uint32 accid, std::string new_uname,
|
|||
if(utf8length(new_passwd) > MAX_ACCOUNT_STR)
|
||||
return AOR_PASS_TOO_LONG;
|
||||
|
||||
normilizeString(new_uname);
|
||||
normilizeString(new_passwd);
|
||||
normalizeString(new_uname);
|
||||
normalizeString(new_passwd);
|
||||
|
||||
loginDatabase.escape_string(new_uname);
|
||||
loginDatabase.escape_string(new_passwd);
|
||||
|
|
@ -139,7 +139,7 @@ AccountOpResult AccountMgr::ChangePassword(uint32 accid, std::string new_passwd)
|
|||
if (utf8length(new_passwd) > MAX_ACCOUNT_STR)
|
||||
return AOR_PASS_TOO_LONG;
|
||||
|
||||
normilizeString(new_passwd);
|
||||
normalizeString(new_passwd);
|
||||
|
||||
loginDatabase.escape_string(new_passwd);
|
||||
if(!loginDatabase.PExecute("UPDATE account SET sha_pass_hash=SHA1("_CONCAT3_("username","':'","'%s'")") WHERE id='%d'", new_passwd.c_str(), accid))
|
||||
|
|
@ -190,7 +190,7 @@ bool AccountMgr::GetName(uint32 acc_id, std::string &name)
|
|||
|
||||
bool AccountMgr::CheckPassword(uint32 accid, std::string passwd)
|
||||
{
|
||||
normilizeString(passwd);
|
||||
normalizeString(passwd);
|
||||
loginDatabase.escape_string(passwd);
|
||||
|
||||
QueryResult *result = loginDatabase.PQuery("SELECT 1 FROM account WHERE id='%d' AND sha_pass_hash=SHA1("_CONCAT3_("username","':'","'%s'")")", accid, passwd.c_str());
|
||||
|
|
@ -203,7 +203,7 @@ bool AccountMgr::CheckPassword(uint32 accid, std::string passwd)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool AccountMgr::normilizeString(std::string& utf8str)
|
||||
bool AccountMgr::normalizeString(std::string& utf8str)
|
||||
{
|
||||
wchar_t wstr_buf[MAX_ACCOUNT_STR+1];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue