diff options
Diffstat (limited to 'src/trinitycore/CliRunnable.cpp')
-rw-r--r-- | src/trinitycore/CliRunnable.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp index e256128ed90..4a681e0ed03 100644 --- a/src/trinitycore/CliRunnable.cpp +++ b/src/trinitycore/CliRunnable.cpp @@ -82,19 +82,10 @@ bool ChatHandler::HandleAccountDeleteCommand(const char* args) } /// Commands not recommended call from chat, but support anyway - if(m_session) - { - uint32 targetSecurity = accmgr.GetSecurity(account_id); - - /// can delete only for account with less security - /// This is also reject self apply in fact - if (targetSecurity >= m_session->GetSecurity()) - { - SendSysMessage (LANG_YOURS_SECURITY_IS_LOW); - SetSentErrorMessage (true); - return false; - } - } + /// can delete only for account with less security + /// This is also reject self apply in fact + if(HasLowerSecurityAccount (NULL,account_id,true)) + return false; AccountOpResult result = accmgr.DeleteAccount(account_id); switch(result) @@ -318,7 +309,7 @@ void CliRunnable::run() char commandbuf[256]; ///- Display the list of available CLI functions then beep - sLog.outString(); + sLog.outString(""); if(sConfig.GetBoolDefault("BeepAtStart", true)) printf("\a"); // \a = Alert @@ -373,4 +364,3 @@ void CliRunnable::run() ///- End the database thread WorldDatabase.ThreadEnd(); // free mySQL thread resources } - |