Core/Channels: Don't send channel kick/ban notifications if kicker is GM and Channel.SilentlyGMJoin == 1. (Aokromes' Suggestions)--;

This commit is contained in:
Machiavelli
2011-12-14 13:53:47 +01:00
parent 203d4a4952
commit 8ca9b38fee
2 changed files with 10 additions and 5 deletions
+8 -4
View File
@@ -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);