]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_list.cpp
Extra Dry! Shame it's not in Hereford right now :p
[user/henk/code/inspircd.git] / src / cmd_list.cpp
index ab073b9e81194c31b40f53febc474e0c218076e3..ed956e7f10ab178cb9b5ebc551c84d4df6a673c0 100644 (file)
@@ -56,8 +56,11 @@ CmdResult cmd_list::Handle (const char** parameters, int pcnt, userrec *user)
                if (too_many || too_few)
                        continue;
 
-               if (pcnt && (!match(i->second->name, parameters[0]) || (*i->second->topic && !match(i->second->topic, parameters[0]))))
-                       continue;
+               if (pcnt)
+               {
+                       if (!match(i->second->name, parameters[0]) && !match(i->second->topic, parameters[0]))
+                               continue;
+               }
 
                // if the channel is not private/secret, OR the user is on the channel anyway
                bool n = i->second->HasUser(user);