From 2ab52aa2a12edf8411a8231101957c59f2ec2bc1 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 28 Mar 2009 17:31:27 -0600 Subject: [7565] Move all hardcoded strings used in .account onlinelist to DB. Author: VladimirMangos Also update format as originally suggested by Cha0S2. --HG-- branch : trunk --- src/trinitycore/CliRunnable.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/trinitycore/CliRunnable.cpp') 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; } -- cgit v1.2.3