void Channel::UnBan(Player *good, const char *badname) { WorldPacket data; if(!IsOn(good)) { MakeNotOn(&data); SendToOne(&data,good); } else if(!players[good].moderator && good->GetSession()->GetSecurity() < 2) { MakeNotModerator(&data); SendToOne(&data,good); } else { Player *bad = objmgr.GetPlayer(badname); if(bad == NULL || !IsBanned(bad->GetGUID())) { MakeNotOn(&data,badname); // Change to <Not Banned> message. Not sure what it is. SendToOne(&data,good); } else { banned.remove(bad->GetGUID()); MakeUnbanned(&data,good,bad); SendToAll(&data); } } }
void Channel::UnBan(uint64 good, const char *badname) { uint32 sec = 0; Player *gplr = objmgr.GetPlayer(good); if(gplr) sec = gplr->GetSession()->GetSecurity(); if(!IsOn(good)) { WorldPacket data; MakeNotOn(&data); SendToOne(&data,good); } else if(!players[good].moderator && sec < SEC_GAMEMASTER) { WorldPacket data; MakeNotModerator(&data); SendToOne(&data,good); } else { Player *bad = objmgr.GetPlayer(badname); if(bad == NULL || !IsBanned(bad->GetGUID())) { WorldPacket data; MakeNotOn(&data,badname); SendToOne(&data,good); } else { banned.remove(bad->GetGUID()); WorldPacket data; MakeUnbanned(&data,good,bad->GetGUID()); SendToAll(&data); } } }