]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix the code that nobody tested :p
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 14 Jan 2007 19:08:54 +0000 (19:08 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 14 Jan 2007 19:08:54 +0000 (19:08 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6331 e03df62e-2008-0410-955e-edbf42e46eb7

src/mode.cpp

index 29ad184581ad4857e9302b27176598634e628f71..db409f2e37c013a464cacaeaccf187e7861db16e 100644 (file)
@@ -304,6 +304,7 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
                        }
 
                        ModeHandler *mh = this->FindMode(*mode, MODETYPE_CHANNEL);
+                       bool display = true;
 
                        if ((mh) && (mh->IsListMode()))
                        {
@@ -315,11 +316,12 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
                                {
                                        std::string dummyparam;
                                        
-                                       if((*watchers)->BeforeMode(user, NULL, targetchannel, dummyparam, true, MODETYPE_CHANNEL) == MODEACTION_ALLOW)
-                                       {
-                                               mh->DisplayList(user, targetchannel);
-                                       }
+                                       if((*watchers)->BeforeMode(user, NULL, targetchannel, dummyparam, true, MODETYPE_CHANNEL) == MODEACTION_DENY)
+                                               display = false;
                                }
+
+                               if (display)
+                                       mh->DisplayList(user, targetchannel);
                        }
 
                        mode++;