[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
This commit is contained in:
XTZGZoReX committed 2008-10-12 14:03:38 -05:00
1 parent e539b4ca7f
commit 054725122f
42 files changed
+5363 -13568

No files matched your search

+5 -7
View File
@@ -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;