]> arthur.barton.de Git - ngircd-alex.git/commitdiff
LIST command: compare pattern case insensitive
authorAlexander Barton <alex@barton.de>
Fri, 6 Jan 2012 18:55:21 +0000 (19:55 +0100)
committerAlexander Barton <alex@barton.de>
Fri, 6 Jan 2012 18:55:21 +0000 (19:55 +0100)
src/ngircd/irc-channel.c

index c5eb369d269cb76fc676ac5e1c7bc6d4640f285a..94a8a4d723db07661fdcff9bb794dffe9654f6f7 100644 (file)
@@ -645,10 +645,12 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
 
        while (pattern) {
                /* Loop through all the channels */
+               if (Req->argc > 0)
+                       ngt_LowerStr(pattern);
                chan = Channel_First();
                while (chan) {
                        /* Check search pattern */
-                       if (Match(pattern, Channel_Name(chan))) {
+                       if (MatchCaseInsensitive(pattern, Channel_Name(chan))) {
                                /* Gotcha! */
                                if (!strchr(Channel_Modes(chan), 's')
                                    || Channel_IsMemberOf(chan, from)) {