summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-02 13:15:28 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-02 13:15:28 +0000
commit6b71dd897fcd8c5925c18d5db6144996a016781a (patch)
tree82e607900b0901d54620d171d5c2552be7e6c1a1 /src
parent4b0915fc00af7a078f9873de4f5a249adf583eb9 (diff)
That patch (TM) of controversy, plus a minor cleanup
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5830 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/mode.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index ea51ce71d..722e06b4a 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -289,14 +289,20 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
{
ServerInstance->Log(DEBUG,"Spool list");
const char* mode = parameters[1];
- if (*mode == '+')
- mode++;
- unsigned char handler_id = ((*mode) - 65) | MASK_CHANNEL;
- ModeHandler* mh = modehandlers[handler_id];
- if ((mh) && (mh->IsListMode()))
+
+ while (mode && *mode)
{
- mh->DisplayList(user, targetchannel);
- return;
+ if (*mode == '+')
+ continue;
+
+ ModeHandler *mh = this->FindMode(*mode, MODETYPE_CHANNEL);
+
+ if ((mh) && (mh->IsListMode()))
+ {
+ mh->DisplayList(user, targetchannel);
+ }
+
+ mode++;
}
}