mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 22:37:06 +00:00
[7565] Move all hardcoded strings used in .account onlinelist to DB.
Also update format as originally suggested by Cha0S2.
This commit is contained in:
parent
8d8da21f95
commit
6e9542ca16
6 changed files with 29 additions and 9 deletions
|
|
@ -166,12 +166,15 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args)
|
|||
///- Get the list of accounts ID logged to the realm
|
||||
QueryResult *resultDB = CharacterDatabase.Query("SELECT name,account FROM characters WHERE online > 0");
|
||||
if (!resultDB)
|
||||
{
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_EMPTY);
|
||||
return true;
|
||||
}
|
||||
|
||||
///- Display the list of account/characters online
|
||||
SendSysMessage("=====================================================================");
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_BAR);
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_HEADER);
|
||||
SendSysMessage("=====================================================================");
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_BAR);
|
||||
|
||||
///- Circle through accounts
|
||||
do
|
||||
|
|
@ -188,7 +191,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args)
|
|||
if(resultLogin)
|
||||
{
|
||||
Field *fieldsLogin = resultLogin->Fetch();
|
||||
PSendSysMessage("|%15s| %20s | %15s |%4d|%5d|",
|
||||
PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
|
||||
fieldsLogin[0].GetString(),name.c_str(),fieldsLogin[1].GetString(),fieldsLogin[2].GetUInt32(),fieldsLogin[3].GetUInt32());
|
||||
|
||||
delete resultLogin;
|
||||
|
|
@ -200,7 +203,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args)
|
|||
|
||||
delete resultDB;
|
||||
|
||||
SendSysMessage("=====================================================================");
|
||||
SendSysMessage(LANG_ACCOUNT_LIST_BAR);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue