25#include <unordered_set>
156 bool _invisible =
false;
178 void UpdateChannelInDB();
180 void SetPassword(std::string
const& password) { _channelPassword = password; }
181 bool CheckPassword(std::string
const& password)
const {
return _channelPassword.empty() || (_channelPassword == password); }
190 void JoinChannel(
Player* player, std::string
const& pass =
"");
191 void LeaveChannel(
Player* player,
bool send =
true,
bool suspend =
false);
193 void KickOrBan(
Player const* player, std::string
const& badname,
bool ban);
194 void Kick(
Player const* player, std::string
const& badname) { KickOrBan(player, badname,
false); }
195 void Ban(
Player const* player, std::string
const& badname) { KickOrBan(player, badname,
true); }
197 void UnBan(
Player const* player, std::string
const& badname);
198 void Password(
Player const* player, std::string
const& pass);
199 void SetMode(
Player const* player, std::string
const& p2n,
bool mod,
bool set);
201 void SetInvisible(
Player const* player,
bool on);
203 void SetOwner(
ObjectGuid const& guid,
bool exclaim =
true);
204 void SetOwner(
Player const* player, std::string
const& name);
205 void SendWhoOwner(
Player const* player);
207 void SetModerator(
Player const* player, std::string
const& newname) { SetMode(player, newname,
true,
true); }
208 void UnsetModerator(
Player const* player, std::string
const& newname) { SetMode(player, newname,
true,
false); }
209 void SetMute(
Player const* player, std::string
const& newname) { SetMode(player, newname,
false,
true); }
210 void UnsetMute(
Player const* player, std::string
const& newname) { SetMode(player, newname,
false,
false); }
211 void SilenceAll(
Player const* player, std::string
const& name);
212 void UnsilenceAll(
Player const* player, std::string
const& name);
213 void List(
Player const* player);
214 void Announce(
Player const* player);
216 void AddonSay(
ObjectGuid const& guid, std::string
const& prefix, std::string
const& what,
bool isLogged)
const;
217 void DeclineInvite(
Player const* player);
218 void Invite(
Player const* player, std::string
const& newp);
219 void JoinNotify(
Player const* player);
220 void LeaveNotify(
Player const* player);
224 template <
class Builder>
227 template <
class Builder>
228 void SendToAllButOne(Builder& builder,
ObjectGuid const& who)
const;
230 template <
class Builder>
231 void SendToOne(Builder& builder,
ObjectGuid const& who)
const;
233 template <
class Builder>
236 bool IsOn(
ObjectGuid who)
const {
return _playersStore.find(who) != _playersStore.end(); }
241 PlayerContainer::const_iterator itr = _playersStore.find(guid);
242 return itr != _playersStore.end() ? itr->second.GetFlags() : 0;
245 void SetModerator(
ObjectGuid const& guid,
bool set);
246 void SetMute(
ObjectGuid const& guid,
bool set);
@ CHAT_MODERATION_OFF_NOTICE
@ CHAT_WRONG_FACTION_NOTICE
@ CHAT_NOT_MODERATOR_NOTICE
@ CHAT_PLAYER_UNBANNED_NOTICE
@ CHAT_PLAYER_NOT_FOUND_NOTICE
@ CHAT_PLAYER_NOT_BANNED_NOTICE
@ CHAT_PLAYER_INVITED_NOTICE
@ CHAT_PLAYER_KICKED_NOTICE
@ CHAT_NOT_ALLOWED_IN_CHANNEL
@ CHAT_MODE_CHANGE_NOTICE
@ CHAT_ANNOUNCEMENTS_ON_NOTICE
@ CHAT_INVITE_WRONG_FACTION_NOTICE
@ CHAT_PLAYER_BANNED_NOTICE
@ CHAT_PLAYER_ALREADY_MEMBER_NOTICE
@ CHAT_OWNER_CHANGED_NOTICE
@ CHAT_ANNOUNCEMENTS_OFF_NOTICE
@ CHAT_NOT_IN_AREA_NOTICE
@ CHAT_NOT_MODERATED_NOTICE
@ CHAT_CHANNEL_OWNER_NOTICE
@ CHAT_WRONG_PASSWORD_NOTICE
@ CHAT_PLAYER_INVITE_BANNED_NOTICE
@ CHAT_PASSWORD_CHANGED_NOTICE
@ CHAT_INVALID_NAME_NOTICE
@ CHAT_MODERATION_ON_NOTICE
std::unordered_set< ObjectGuid > GuidUnorderedSet
BannedContainer _bannedStore
GuidUnorderedSet BannedContainer
bool HasFlag(uint8 flag) const
time_t _nextActivityUpdateTime
void SetMute(Player const *player, std::string const &newname)
void SetModerator(Player const *player, std::string const &newname)
void Ban(Player const *player, std::string const &badname)
void UnsetMute(Player const *player, std::string const &newname)
uint32 GetChannelId() const
bool CheckPassword(std::string const &password) const
bool IsOn(ObjectGuid who) const
void UnsetModerator(Player const *player, std::string const &newname)
void SetPassword(std::string const &password)
uint8 GetPlayerFlags(ObjectGuid const &guid) const
void Kick(Player const *player, std::string const &badname)
void SetAnnounce(bool announce)
void SetOwnership(bool ownership)
uint32 GetNumPlayers() const
bool IsBanned(ObjectGuid guid) const
AreaTableEntry const * _zoneEntry
ObjectGuid GetGUID() const
std::string _channelPassword
std::map< ObjectGuid, PlayerInfo > PlayerContainer
PlayerContainer _playersStore
AreaTableEntry const * GetZoneEntry() const
static ObjectGuid const Empty
TC_GAME_API bool GetName(uint32 accountId, std::string &name)
void SetModerator(bool state)
bool HasFlag(uint8 flag) const
void SetInvisible(bool on)
void SetOwner(bool state)
void SetMuted(bool state)
void RemoveFlag(uint8 flag)