X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_clearchan.cpp;h=d7dceaf95c43018e4124ee97381038cce6303457;hb=2cffabe0c7375a15c702aeaea5d553d90a549860;hp=27f8ec32f7584d1e322419d0c284e7b381144d5c;hpb=7acb4ced207da7308d471a4ca434ce1cc7b9e9cb;p=user%2Fhenk%2Fcode%2Finspircd.git 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; }