mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Channels: Don't send channel kick/ban notifications if kicker is GM and Channel.SilentlyGMJoin == 1. (Aokromes' Suggestions)--;
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user