aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/ChatHandler.cpp
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2013-03-08 13:15:25 +0100
committerSpp <spp@jorge.gr>2013-03-08 13:15:25 +0100
commit377cfdb5602cec4ce13d9d50937836aa7e03c446 (patch)
tree87ff543f2f3b6324bdeef491344b97a7394d82aa /src/server/game/Handlers/ChatHandler.cpp
parentb4542c65048344019007a666a2bd35f9453d5664 (diff)
Core/RBAC: Fix multiple permissions and remove multiple config options that are currently implementes by RBAC
- Remove config options: CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT, CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, CONFIG_GM_LOG_TRADE, CONFIG_ALLOW_TWO_SIDE_ACCOUNTS, CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_ALLOW_GM_FRIEND, CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL - Fix RBAC_PERM_SKIP_CHECK_CHAT_SPAM (Was checking spam for those that had the permission) - Only check RBAC_PERM_TWO_SIDE_INTERACTION_CHAT for sender of whispers (Restores GM being able to whisper players) - Only check RBAC_PERM_TWO_SIDE_INTERACTION_MAIL for sender - Fix .ticket assign <Player>, with last RBAC change it was changed by mistake from Player to Account
Diffstat (limited to 'src/server/game/Handlers/ChatHandler.cpp')
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index efb3a3b6d7c..9f942024851 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -129,8 +129,10 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
lang = LANG_UNIVERSAL;
else
{
- // send in universal language in two side iteration allowed mode
- if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT))
+ Unit::AuraEffectList const& ModLangAuras = sender->GetAuraEffectsByType(SPELL_AURA_MOD_LANGUAGE);
+ if (!ModLangAuras.empty())
+ lang = ModLangAuras.front()->GetMiscValue();
+ else if (HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT))
lang = LANG_UNIVERSAL;
else
{
@@ -153,11 +155,6 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
break;
}
}
-
- // but overwrite it by SPELL_AURA_MOD_LANGUAGE auras (only single case used)
- Unit::AuraEffectList const& ModLangAuras = sender->GetAuraEffectsByType(SPELL_AURA_MOD_LANGUAGE);
- if (!ModLangAuras.empty())
- lang = ModLangAuras.front()->GetMiscValue();
}
if (!sender->CanSpeak())
@@ -281,10 +278,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
return;
}
- if (GetPlayer()->GetTeam() != receiver->GetTeam() &&
- (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT) ||
- !HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT) ||
- !receiver->GetSession()->HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT)))
+ if (GetPlayer()->GetTeam() != receiver->GetTeam() && !HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT))
{
SendWrongFactionNotice();
return;