Core/Chat: Configure automatic owner declaration for custom chat channels (patch by leak)

Closes issue 4974.

--HG--
branch : trunk
This commit is contained in:
click
2010-12-02 03:54:52 +01:00
parent 0c44bd33ee
commit bc098658c6
19 changed files with 920 additions and 188 deletions
+7 -10
View File
@@ -48,8 +48,8 @@ enum ChatNotify
CHAT_MODE_CHANGE_NOTICE = 0x0C, //?
CHAT_ANNOUNCEMENTS_ON_NOTICE = 0x0D, //+ "[%s] Channel announcements enabled by %s.";
CHAT_ANNOUNCEMENTS_OFF_NOTICE = 0x0E, //+ "[%s] Channel announcements disabled by %s.";
CHAT_MODERATION_ON_NOTICE = 0x0F, //+ "[%s] Channel moderation enabled by %s.";
CHAT_MODERATION_OFF_NOTICE = 0x10, //+ "[%s] Channel moderation disabled by %s.";
// CHAT_MODERATION_ON_NOTICE = 0x0F, //+ "[%s] Channel moderation enabled by %s.";
// CHAT_MODERATION_OFF_NOTICE = 0x10, //+ "[%s] Channel moderation disabled by %s.";
CHAT_MUTED_NOTICE = 0x11, //+ "[%s] You do not have permission to speak.";
CHAT_PLAYER_KICKED_NOTICE = 0x12, //? "[%s] Player %s kicked by %s.";
CHAT_BANNED_NOTICE = 0x13, //+ "[%s] You are banned from that channel.";
@@ -150,8 +150,7 @@ class Channel
typedef std::set<uint64> BannedList;
BannedList banned;
bool m_announce;
bool m_moderate;
bool m_public;
bool m_ownership;
std::string m_name;
std::string m_password;
uint8 m_flags;
@@ -178,8 +177,6 @@ class Channel
void MakeModeChange(WorldPacket *data, uint64 guid, uint8 oldflags); //+ 0x0C
void MakeAnnouncementsOn(WorldPacket *data, uint64 guid); //+ 0x0D
void MakeAnnouncementsOff(WorldPacket *data, uint64 guid); //+ 0x0E
void MakeModerationOn(WorldPacket *data, uint64 guid); //+ 0x0F
void MakeModerationOff(WorldPacket *data, uint64 guid); //+ 0x10
void MakeMuted(WorldPacket *data); //? 0x11
void MakePlayerKicked(WorldPacket *data, uint64 bad, uint64 good); //? 0x12
void MakeBanned(WorldPacket *data); //? 0x13
@@ -207,9 +204,8 @@ class Channel
bool IsOn(uint64 who) const { return players.find(who) != players.end(); }
bool IsBanned(uint64 guid) const { return banned.find(guid) != banned.end(); }
bool _UpdateStringInDB(const std::string& colName, const std::string& colValue) const;
bool _UpdateIntInDB(const std::string& colName, int colValue) const;
void _UpdateBanListInDB() const;
void UpdateChannelInDB() const;
void UpdateChannelUseageInDB() const;
uint8 GetPlayerFlags(uint64 p) const
{
@@ -278,13 +274,14 @@ class Channel
void UnsetMute(uint64 p, const char *newname) { SetMode(p, newname, false, false); }
void List(Player* p);
void Announce(uint64 p);
void Moderate(uint64 p);
void Say(uint64 p, const char *what, uint32 lang);
void Invite(uint64 p, const char *newp);
void Voice(uint64 guid1, uint64 guid2);
void DeVoice(uint64 guid1, uint64 guid2);
void JoinNotify(uint64 guid); // invisible notify
void LeaveNotify(uint64 guid); // invisible notify
void SetOwnership(bool ownership) { m_ownership = ownership; };
static void CleanOldChannelsInDB();
};
#endif