diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-14 19:08:54 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-14 19:08:54 +0000 |
commit | 208f557d4a3c1211cbccb5733370f2e1eb8cf065 (patch) | |
tree | 4483d42c4f731a80b780003f189b0d3636d61067 | |
parent | 32700c949d1606b1315fca37f0b4380919dea37b (diff) |
Fix the code that nobody tested :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6331 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/mode.cpp | 10 |
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++; |