diff options
Diffstat (limited to 'src/game/Level2.cpp')
-rw-r--r-- | src/game/Level2.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index 75bd8357200..73bfb7bd96b 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -2282,21 +2282,26 @@ bool ChatHandler::HandlePInfoCommand(const char* args) } std::string username = GetTrinityString(LANG_ERROR); + std::string email = GetTrinityString(LANG_ERROR); std::string last_ip = GetTrinityString(LANG_ERROR); uint32 security = 0; std::string last_login = GetTrinityString(LANG_ERROR); - QueryResult* result = LoginDatabase.PQuery("SELECT username,gmlevel,last_ip,last_login FROM account WHERE id = '%u'",accId); + QueryResult* result = LoginDatabase.PQuery("SELECT username,gmlevel,email,last_ip,last_login FROM account WHERE id = '%u'",accId); if(result) { Field* fields = result->Fetch(); username = fields[0].GetCppString(); security = fields[1].GetUInt32(); + email = fields[2].GetCppString(); + + if(email.empty()) + email = "-"; if(!m_session || m_session->GetSecurity() >= security) { - last_ip = fields[2].GetCppString(); - last_login = fields[3].GetCppString(); + last_ip = fields[3].GetCppString(); + last_login = fields[4].GetCppString(); } else { @@ -2309,7 +2314,7 @@ bool ChatHandler::HandlePInfoCommand(const char* args) std::string nameLink = playerLink(target_name); - PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetMangosString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, security, last_ip.c_str(), last_login.c_str(), latency); + PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetTrinityString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, email.c_str(), security, last_ip.c_str(), last_login.c_str(), latency); std::string timeStr = secsToTimeString(total_player_time,true,true); uint32 gold = money /GOLD; |