diff options
| author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-02-25 17:11:36 +0100 |
|---|---|---|
| committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-02-25 17:11:36 +0100 |
| commit | 529c4b7592b7e9b2f15436e98566bbe5da463534 (patch) | |
| tree | 87d5f56472fbd366a7c06050dd93e9fe435690cd /src/server/game/Chat/Chat.cpp | |
| parent | 1fba352a88472f31b2d0cb36214dc655373e9e84 (diff) | |
| parent | c6d6cb7e745f8d320cfc9745dafc2d67fd87ba8c (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Entities/Player/Player.cpp
src/server/game/Handlers/MailHandler.cpp
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
| -rw-r--r-- | src/server/game/Chat/Chat.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 12a98126dbf..62a148eae03 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -175,7 +175,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 (!AccountMgr::IsPlayerAccount(m_session->GetSecurity()) && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY)) + if (m_session->HasPermission(RBAC_PERM_CHECK_FOR_LOWER_SECURITY) && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY)) return false; if (target) @@ -361,6 +361,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)) { + // FIXME: When Command system is moved to RBAC this check must be changed if (!AccountMgr::IsPlayerAccount(table[i].SecurityLevel)) { // chat case @@ -476,7 +477,7 @@ bool ChatHandler::ParseCommands(char const* text) if (!ExecuteCommandInTable(getCommandTable(), text, fullcmd)) { - if (m_session && AccountMgr::IsPlayerAccount(m_session->GetSecurity())) + if (m_session && !m_session->HasPermission(RBAC_PERM_COMMANDS_NOTIFY_COMMAND_NOT_FOUND_ERROR)) return false; SendSysMessage(LANG_NO_CMD); |
