]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_inviteexception Remove useless check
authorattilamolnar <attilamolnar@hush.com>
Wed, 4 Jul 2012 13:44:38 +0000 (15:44 +0200)
committerattilamolnar <attilamolnar@hush.com>
Sat, 7 Jul 2012 13:13:09 +0000 (15:13 +0200)
src/modules/m_inviteexception.cpp

index 33c82fa0a2490772ba9fb56e12f143e5309085ed..5e6628e6d859dc27f36f138386905e9397745c5e 100644 (file)
@@ -68,17 +68,14 @@ public:
 
        ModResult OnCheckInvite(User* user, Channel* chan)
        {
-               if(chan != NULL)
+               modelist* list = ie.extItem.get(chan);
+               if (list)
                {
-                       modelist* list = ie.extItem.get(chan);
-                       if (list)
+                       for (modelist::iterator it = list->begin(); it != list->end(); it++)
                        {
-                               for (modelist::iterator it = list->begin(); it != list->end(); it++)
+                               if (chan->CheckBan(user, it->mask))
                                {
-                                       if (chan->CheckBan(user, it->mask))
-                                       {
-                                               return MOD_RES_ALLOW;
-                                       }
+                                       return MOD_RES_ALLOW;
                                }
                        }
                }