diff options
Diffstat (limited to 'src/mangosd/CliRunnable.cpp')
-rw-r--r-- | src/mangosd/CliRunnable.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mangosd/CliRunnable.cpp b/src/mangosd/CliRunnable.cpp index 267a8d41a27..7193fa705a0 100644 --- a/src/mangosd/CliRunnable.cpp +++ b/src/mangosd/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) |