aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_clearchan.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-06-10 17:19:27 +0200
committerGravatar Attila Molnar2014-06-10 17:19:27 +0200
commitb6da8d9e22a8b03ae13339ab8db3305797cba295 (patch)
tree7d3f8cc414d83d26487267788c3ff31ef383c77d /src/modules/m_clearchan.cpp
parentChange Channel::KickUser() to accept an iterator, add overload that accepts a... (diff)
Use the iterator version of Channel::KickUser() in a few places
Diffstat (limited to 'src/modules/m_clearchan.cpp')
-rw-r--r--src/modules/m_clearchan.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_clearchan.cpp b/src/modules/m_clearchan.cpp
index 27f8ec32f..d7dceaf95 100644
--- a/src/modules/m_clearchan.cpp
+++ b/src/modules/m_clearchan.cpp
@@ -93,10 +93,11 @@ class CommandClearChan : public Command
std::string mask;
// Now remove all local non-opers from the channel
- const UserMembList* users = chan->GetUsers();
- for (UserMembCIter i = users->begin(); i != users->end(); )
+ UserMembList& users = chan->userlist;
+ for (UserMembIter i = users.begin(); i != users.end(); )
{
User* curr = i->first;
+ const UserMembIter currit = i;
++i;
if (!IS_LOCAL(curr) || curr->IsOper())
@@ -105,7 +106,7 @@ class CommandClearChan : public Command
// If kicking users, remove them and skip the QuitUser()
if (kick)
{
- chan->KickUser(ServerInstance->FakeClient, curr, reason);
+ chan->KickUser(ServerInstance->FakeClient, currit, reason);
continue;
}