summaryrefslogtreecommitdiff
path: root/src/messages.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-28 10:37:54 -0500
committerAdam <Adam@anope.org>2012-12-28 10:43:30 -0500
commitb591e8cdc8b1bc40a6a59b54dcb6266d9656b616 (patch)
tree2a31259930d9915d9248a29dc5b97006620675a2 /src/messages.cpp
parent379b2ccf92b6124f2026a5ec683cfc98f08e223a (diff)
Use the same object for chanusercontainer and userchancontainer
Diffstat (limited to 'src/messages.cpp')
-rw-r--r--src/messages.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index f9dc81c85..79a32347b 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -62,16 +62,15 @@ void Join::Run(MessageSource &source, const std::vector<Anope::string> &params)
/* Special case for /join 0 */
if (channel == "0")
{
- for (UChannelList::iterator it = user->chans.begin(), it_end = user->chans.end(); it != it_end; )
+ for (User::ChanUserList::iterator it = user->chans.begin(), it_end = user->chans.end(); it != it_end; )
{
- ChannelContainer *cc = *it++;
+ ChanUserContainer *cc = *it++;
Anope::string channame = cc->chan->name;
FOREACH_MOD(I_OnPrePartChannel, OnPrePartChannel(user, cc->chan));
cc->chan->DeleteUser(user);
FOREACH_MOD(I_OnPartChannel, OnPartChannel(user, Channel::Find(channame), channame, ""));
}
- user->chans.clear();
continue;
}
@@ -119,10 +118,10 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co
FOREACH_RESULT(I_OnPreJoinChannel, OnPreJoinChannel(u, c));
/* Add the user to the channel */
- UserContainer *cc = c->JoinUser(u);
+ ChanUserContainer *cc = c->JoinUser(u);
/* Update their status internally on the channel */
- *cc->status = status;
+ cc->status = status;
/* Set whatever modes the user should have, and remove any that
* they aren't allowed to have (secureops etc).
@@ -190,8 +189,8 @@ void Kill::Run(MessageSource &source, const std::vector<Anope::string> &params)
IRCD->SendClientIntroduction(bi);
bi->introduced = true;
- for (UChannelList::const_iterator cit = bi->chans.begin(), cit_end = bi->chans.end(); cit != cit_end; ++cit)
- IRCD->SendJoin(bi, (*cit)->chan, (*cit)->status);
+ for (User::ChanUserList::const_iterator cit = bi->chans.begin(), cit_end = bi->chans.end(); cit != cit_end; ++cit)
+ IRCD->SendJoin(bi, (*cit)->chan, &(*cit)->status);
}
else
u->KillInternal(source.GetSource(), params[1]);