]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/mode.cpp
Bad w00tie bad, /who isnt checking +s for channel /who!
[user/henk/code/inspircd.git] / src / mode.cpp
index 560bd8d04fd52121ca2fe9d7179a6b74ff466644..eee50c29378e39bfeaaed2536f32c17c3c041afa 100644 (file)
@@ -289,14 +289,23 @@ 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 == '+')
+                       {
+                               mode++;
+                               continue;
+                       }
+
+                       ModeHandler *mh = this->FindMode(*mode, MODETYPE_CHANNEL);
+
+                       if ((mh) && (mh->IsListMode()))
+                       {
+                               mh->DisplayList(user, targetchannel);
+                       }
+
+                       mode++;
                }
        }
 
@@ -610,8 +619,9 @@ bool ModeParser::AddMode(ModeHandler* mh, unsigned const char modeletter)
 
        /* A mode prefix of ',' is not acceptable, it would fuck up server to server.
         * A mode prefix of ':' will fuck up both server to server, and client to server.
+        * A mode prefix of '#' will mess up /whois and /privmsg
         */
-       if ((mh->GetPrefix() == ',') || (mh->GetPrefix() == ':'))
+       if ((mh->GetPrefix() == ',') || (mh->GetPrefix() == ':') || (mh->GetPrefix() == '#'))
                return false;
 
        mh->GetModeType() == MODETYPE_USER ? mask = MASK_USER : mask = MASK_CHANNEL;