summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mode.cpp10
1 files changed, 6 insertions, 4 deletions
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++;