]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nickflood.cpp
Replace OnAccessCheck with OnPreMode to remove a number of redundant checks
[user/henk/code/inspircd.git] / src / modules / m_nickflood.cpp
index 898c7358dec9f86cf9c1d646a7bbc8df73e9f3cd..e2ec1e3edc5522dd6e399f219aca9dccdbec27df 100644 (file)
@@ -214,12 +214,12 @@ class ModuleNickFlood : public Module
 
                for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
                {
-                       Channel *channel = i->first;
+                       Channel *channel = *i;
 
                        nickfloodsettings *f = nf.ext.get(channel);
                        if (f)
                        {
-                               if (CHANOPS_EXEMPT(ServerInstance, 'F') && channel->GetStatus(user) == STATUS_OP)
+                               if (CHANOPS_EXEMPT(ServerInstance, 'F') && channel->GetPrefixValue(user) == OP_VALUE)
                                        continue;
 
                                if (f->islocked())
@@ -251,12 +251,12 @@ class ModuleNickFlood : public Module
 
                for (UCListIter i = user->chans.begin(); i != user->chans.end(); ++i)
                {
-                       Channel *channel = i->first;
+                       Channel *channel = *i;
 
                        nickfloodsettings *f = nf.ext.get(channel);
                        if (f)
                        {
-                               if (CHANOPS_EXEMPT(ServerInstance, 'F') && channel->GetStatus(user) == STATUS_OP)
+                               if (CHANOPS_EXEMPT(ServerInstance, 'F') && channel->GetPrefixValue(user) == OP_VALUE)
                                        return;
                                
                                /* moved this here to avoid incrementing the counter for nick