From 208f557d4a3c1211cbccb5733370f2e1eb8cf065 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 14 Jan 2007 19:08:54 +0000 Subject: Fix the code that nobody tested :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6331 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index 29ad18458..db409f2e3 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -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++; -- cgit v1.2.3