]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockamsg.cpp
Improved strhashcomp with no allocations
[user/henk/code/inspircd.git] / src / modules / m_blockamsg.cpp
index b3136ee75b441f9d9b867d6e91a20a7bd62185c0..bb95127544b492c3a2790cd9afbdb504bd88ccd9 100644 (file)
@@ -121,8 +121,8 @@ public:
                                if((*c == ',') && *(c+1) && (*(c+1) == '#'))
                                        targets++;
                                        
-                       for(unsigned int i = 0; i < user->chans.size(); i++)
-                               if(user->chans[i].channel)
+                       for(std::vector<ucrec*>::iterator f = user->chans.begin(); f != user->chans.end(); f++)
+                               if(((ucrec*)(*f))->channel)
                                        userchans++;
 
                        // Check that this message wasn't already sent within a few seconds.
@@ -201,4 +201,3 @@ extern "C" void * init_module( void )
 {
        return new ModuleBlockAmsgFactory;
 }
-