mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
mangosd->trinitycore & realmd->trinityrealm
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user