[7565] Move all hardcoded strings used in .account onlinelist to DB. Author: VladimirMangos

Also update format as originally suggested by Cha0S2.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-28 17:31:27 -06:00
parent b72b2a2f5e
commit 2ab52aa2a1
4 changed files with 26 additions and 8 deletions

View File

@@ -168,12 +168,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
@@ -190,7 +193,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;
@@ -202,7 +205,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args)
delete resultDB;
SendSysMessage("=====================================================================");
SendSysMessage(LANG_ACCOUNT_LIST_BAR);
return true;
}