aboutsummaryrefslogtreecommitdiff
path: root/src/trinitycore/CliRunnable.cpp
diff options
context:
space:
mode:
authorpanaut0lordv <panaut0lordv@gmail.com>2009-03-20 22:17:39 +0100
committerpanaut0lordv <panaut0lordv@gmail.com>2009-03-20 22:17:39 +0100
commite409fb63e9fd47f4c586ab43ca4b42b9ca58b423 (patch)
tree760385782ea4fc140e62c6f127509f77d691a47a /src/trinitycore/CliRunnable.cpp
parentf3a543bef3690dae643653ff97120db17ba13d34 (diff)
mangosd->trinitycore & realmd->trinityrealm
--HG-- branch : trunk
Diffstat (limited to 'src/trinitycore/CliRunnable.cpp')
-rw-r--r--src/trinitycore/CliRunnable.cpp20
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
}
-