mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
show email in .pinfo command. Based on the work of @Salja
This commit is contained in:
parent
fbdc248ed1
commit
95056c5a29
1 changed files with 11 additions and 1 deletions
|
|
@ -2954,6 +2954,7 @@ bool ChatHandler::HandlePInfoCommand(char* args)
|
|||
}
|
||||
|
||||
std::string username = GetMangosString(LANG_ERROR);
|
||||
std::string email = GetMangosString(LANG_ERROR);
|
||||
std::string last_ip = GetMangosString(LANG_ERROR);
|
||||
AccountTypes security = SEC_PLAYER;
|
||||
std::string last_login = GetMangosString(LANG_ERROR);
|
||||
|
|
@ -2967,11 +2968,20 @@ bool ChatHandler::HandlePInfoCommand(char* args)
|
|||
|
||||
if (GetAccessLevel() >= security)
|
||||
{
|
||||
if (security == SEC_ADMINISTRATOR)
|
||||
{
|
||||
email = fields[2].GetCppString();
|
||||
}
|
||||
else
|
||||
{
|
||||
email = "*hidden*";
|
||||
}
|
||||
last_ip = fields[3].GetCppString();
|
||||
last_login = fields[4].GetCppString();
|
||||
}
|
||||
else
|
||||
{
|
||||
email = "-";
|
||||
last_ip = "-";
|
||||
last_login = "-";
|
||||
}
|
||||
|
|
@ -2981,7 +2991,7 @@ bool ChatHandler::HandlePInfoCommand(char* args)
|
|||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_PINFO_ACCOUNT, (target ? "" : GetMangosString(LANG_OFFLINE)), nameLink.c_str(), target_guid.GetCounter(), username.c_str(), accId, security, last_ip.c_str(), last_login.c_str(), latency);
|
||||
PSendSysMessage(LANG_PINFO_ACCOUNT, (target ? "" : GetMangosString(LANG_OFFLINE)), nameLink.c_str(), target_guid.GetCounter(), username.c_str(), accId, security, email.c_str(), last_ip.c_str(), last_login.c_str(), latency);
|
||||
|
||||
std::string timeStr = secsToTimeString(total_player_time, true, true);
|
||||
PSendSysMessage(LANG_PINFO_LEVEL, timeStr.c_str(), level, MoneyToString(money).c_str());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue