diff options
author | megamage <none@none> | 2009-03-28 17:31:27 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-28 17:31:27 -0600 |
commit | 2ab52aa2a12edf8411a8231101957c59f2ec2bc1 (patch) | |
tree | 852bf860928ba21915ea8c5bbf79e56b7363b0f2 /src/trinitycore | |
parent | b72b2a2f5ede384150e586539750dc0e6ce0bd40 (diff) |
[7565] Move all hardcoded strings used in .account onlinelist to DB. Author: VladimirMangos
Also update format as originally suggested by Cha0S2.
--HG--
branch : trunk
Diffstat (limited to 'src/trinitycore')
-rw-r--r-- | src/trinitycore/CliRunnable.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp index 4a681e0ed03..0f37535c8f4 100644 --- a/src/trinitycore/CliRunnable.cpp +++ b/src/trinitycore/CliRunnable.cpp @@ -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; } |