diff options
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
-rwxr-xr-x | src/server/game/Chat/Chat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index aaacaca2661..25f1fadba47 100755 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -510,7 +510,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac return false; // ignore only for non-players for non strong checks (when allow apply command at least to same sec level) - if (m_session->GetSecurity() > SEC_PLAYER && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY)) + if (!AccountMgr::IsPlayerAccount(m_session->GetSecurity()) && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY)) return false; if (target) @@ -696,7 +696,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, co // table[i].Name == "" is special case: send original command to handler if ((table[i].Handler)(this, table[i].Name[0] != '\0' ? text : oldtext)) { - if (table[i].SecurityLevel > SEC_PLAYER) + if (!AccountMgr::IsPlayerAccount(table[i].SecurityLevel)) { // chat case if (m_session) @@ -786,7 +786,7 @@ int ChatHandler::ParseCommands(const char* text) std::string fullcmd = text; - if (m_session && m_session->GetSecurity() <= SEC_PLAYER && sWorld->getBoolConfig(CONFIG_ALLOW_PLAYER_COMMANDS) == 0) + if (m_session && AccountMgr::IsPlayerAccount(m_session->GetSecurity()) && !sWorld->getBoolConfig(CONFIG_ALLOW_PLAYER_COMMANDS)) return 0; /// chat case (.command or !command format) @@ -811,7 +811,7 @@ int ChatHandler::ParseCommands(const char* text) if (!ExecuteCommandInTable(getCommandTable(), text, fullcmd)) { - if (m_session && m_session->GetSecurity() == SEC_PLAYER) + if (m_session && AccountMgr::IsPlayerAccount(m_session->GetSecurity())) return 0; SendSysMessage(LANG_NO_CMD); |