aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/ChatHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/ChatHandler.cpp')
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index 5fd289c7762..095c8088232 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -340,16 +340,21 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
SendPlayerNotFoundNotice(to);
return;
}
- if (!sender->IsGameMaster() && sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && !receiver->IsInWhisperWhiteList(sender->GetGUID()))
- {
- SendNotification(GetTrinityString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
- return;
- }
- if (GetPlayer()->GetTeam() != receiver->GetTeam() && !HasPermission(rbac::RBAC_PERM_TWO_SIDE_INTERACTION_CHAT) && !receiver->IsInWhisperWhiteList(sender->GetGUID()))
+ // Apply checks only if receiver is not already in whitelist and if receiver is not a GM with ".whisper on"
+ if (!receiver->IsInWhisperWhiteList(sender->GetGUID()) && !receiver->IsGameMasterAcceptingWhispers())
{
- SendWrongFactionNotice();
- return;
+ if (!sender->IsGameMaster() && sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ))
+ {
+ SendNotification(GetTrinityString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
+ return;
+ }
+
+ if (GetPlayer()->GetTeam() != receiver->GetTeam() && !HasPermission(rbac::RBAC_PERM_TWO_SIDE_INTERACTION_CHAT))
+ {
+ SendWrongFactionNotice();
+ return;
+ }
}
if (GetPlayer()->HasAura(1852) && !receiver->IsGameMaster())