diff options
author | XTZGZoReX <none@none> | 2008-10-12 14:03:38 -0500 |
---|---|---|
committer | XTZGZoReX <none@none> | 2008-10-12 14:03:38 -0500 |
commit | 054725122f1ef534063ffcbc54b25e167ec3ed9c (patch) | |
tree | e476f95db36b0599d54b74eb01d850d212a09d21 /src/game/Channel.cpp | |
parent | e539b4ca7f89eaaf3efe4cffea7e143f41fc592b (diff) |
[svn] * Various small changes here and there.
* Implementing MangChat IRC system.
* Added new config option, MAX_WHO, can be used to set the limit of characters being sent in a /who request from client.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Channel.cpp')
-rw-r--r-- | src/game/Channel.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/game/Channel.cpp b/src/game/Channel.cpp index 0fff8c7854b..a6a97a61656 100644 --- a/src/game/Channel.cpp +++ b/src/game/Channel.cpp @@ -20,6 +20,7 @@ #include "ObjectMgr.h" #include "World.h" #include "SocialMgr.h" +#include "IRCClient.h" Channel::Channel(std::string name, uint32 channel_id) : m_name(name), m_announce(true), m_moderate(false), m_channelId(channel_id), m_ownerGUID(0), m_password(""), m_flags(0) @@ -112,14 +113,9 @@ void Channel::Join(uint64 p, const char *pass) MakeYouJoined(&data); SendToOne(&data, p); - JoinNotify(p); + sIRC.Handle_WoW_Channel(m_name, objmgr.GetPlayer(p), CHANNEL_JOIN); - // if no owner first logged will become - if(!IsConstant() && !m_ownerGUID) - { - SetOwner(p, (players.size() > 1 ? true : false)); - players[p].SetModerator(true); - } + JoinNotify(p); } void Channel::Leave(uint64 p, bool send) @@ -159,6 +155,8 @@ void Channel::Leave(uint64 p, bool send) LeaveNotify(p); + sIRC.Handle_WoW_Channel(m_name, objmgr.GetPlayer(p), CHANNEL_LEAVE); + if(changeowner) { uint64 newowner = !players.empty() ? players.begin()->second.player : 0; |