diff options
author | Machiavelli <machiavelli.trinity@gmail.com> | 2011-12-14 13:53:47 +0100 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2011-12-14 13:53:47 +0100 |
commit | 8ca9b38feebadf49dcb8c4fa15cf4127c194b9fd (patch) | |
tree | 9f5dfa3f7f96829caa88e15902ec3e27e6f94c65 /src | |
parent | 203d4a4952f9206b155a8903124a6222aaac1b7f (diff) |
Core/Channels: Don't send channel kick/ban notifications if kicker is GM and Channel.SilentlyGMJoin == 1. (Aokromes' Suggestions)--;
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Chat/Channels/Channel.cpp | 12 | ||||
-rw-r--r-- | src/server/worldserver/worldserver.conf.dist | 3 |
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) |