diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-09 12:37:31 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-09 12:37:31 +0000 |
commit | 8dd900c539ff62558a8c56173f17d1721c27b472 (patch) | |
tree | 620cbe98299347b2025a39cc550a817176e98143 | |
parent | 09027c63880b48f5cf0f8ce65c61329aaf9439e6 (diff) |
iterator hell
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3586 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_park.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/modules/m_park.cpp b/src/modules/m_park.cpp index a5c123a5d..29ce2c1eb 100644 --- a/src/modules/m_park.cpp +++ b/src/modules/m_park.cpp @@ -153,14 +153,11 @@ class cmd_unpark : public command_t if (key == atoi(parameters[1])) { // first part the user from all chans theyre on, so things dont get messy - for (unsigned int i = 0; i < user->chans.size(); i++) + for (std::vector<ucrec*>::iterator i = user->chans.begin(); i != user->chans.end(); i++) { - if (user->chans[i].channel != NULL) - { - if (user->chans[i].channel->name) - { - Srv->PartUserFromChannel(user,user->chans[i].channel->name,"Unparking"); - } + if (((ucrec*)(*i))->channel != NULL) + { + Srv->PartUserFromChannel(user,((ucrec*)(*i))->channel->name,"Unparking"); } } // remove all their old modes |