aboutsummaryrefslogtreecommitdiff
path: root/src/mangosd/CliRunnable.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-07 11:56:57 -0600
committermegamage <none@none>2009-01-07 11:56:57 -0600
commit75cd06b98c7dc489ee4554cf3af6a8f6403decee (patch)
tree4d9c2810ef818bc6a8a7f4f94a2375cc8dd41d71 /src/mangosd/CliRunnable.cpp
parentfd07b66887e3a99ab7eeca9d00df12e57750558b (diff)
*Mangos Implement AURA_STATE_HEALTH_ABOVE_75_PERCENT use. By DiSlord.
*Mangos [7045]. More correct spell select for creatures if spell PreventionType == SPELL_PREVENTION_TYPE_SILENCE. Also add check for PreventionType == SPELL_PREVENTION_TYPE_PACIFY. By DiSlord. *Mangos [7046] Do more security level checks in commands using HasLowerSecurity. Make use .account set addon safe for players. By Vladimir. *Mangos [7047] Fix Draenei race spell add at client switch. By DiSlord. --HG-- branch : trunk
Diffstat (limited to 'src/mangosd/CliRunnable.cpp')
-rw-r--r--src/mangosd/CliRunnable.cpp17
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)