aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Chat/Channels/Channel.cpp12
-rw-r--r--src/server/worldserver/worldserver.conf.dist3
2 files changed, 10 insertions, 5 deletions
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index 1968de70f46..244c05ec0ad 100755
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -310,18 +310,22 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
bool changeowner = (m_ownerGUID == bad->GetGUID());
WorldPacket data;
+ bool notify = !(AccountMgr::IsGMAccount(sec) && sWorld->getBoolConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL));
if (ban && !IsBanned(bad->GetGUID()))
{
banned.insert(bad->GetGUID());
- MakePlayerBanned(&data, bad->GetGUID(), good);
-
UpdateChannelInDB();
+
+ if (notify)
+ MakePlayerBanned(&data, bad->GetGUID(), good);
}
- else
+ else if (notify)
MakePlayerKicked(&data, bad->GetGUID(), good);
- SendToAll(&data);
+ if (notify)
+ SendToAll(&data);
+
players.erase(bad->GetGUID());
bad->LeftChannel(this);
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index a8c0d91b2e6..1e37f50aa63 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -1744,7 +1744,8 @@ Channel.RestrictedLfg = 1
#
# Channel.SilentlyGMJoin
-# Description: Silently join GM characters to channels
+# Description: Silently join GM characters to channels. If set to 1, channel kick and ban
+# commands issued by a GM will not be broadcasted.
# Default: 0 - (Disabled, Join with announcement)
# 1 - (Enabled, Join without announcement)