]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_channelban.cpp
Convert UserChanList to an intrusively linked list
[user/henk/code/inspircd.git] / src / modules / m_channelban.cpp
index 3260c0fa48a0e07f8256f089a07ed98d463a8a79..300caa123c080efd7c222b984d299dfaf8d55b48 100644 (file)
@@ -42,15 +42,9 @@ class ModuleBadChannelExtban : public Module
                        }
                        for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
                        {
-                               if (InspIRCd::Match((**i).name, rm))
+                               if (InspIRCd::Match((*i)->chan->name, rm))
                                {
-                                       if (status)
-                                       {
-                                               Membership* memb = (**i).GetUser(user);
-                                               if (memb && memb->hasMode(status))
-                                                       return MOD_RES_DENY;
-                                       }
-                                       else
+                                       if (!status || (*i)->hasMode(status))
                                                return MOD_RES_DENY;
                                }
                        }