From: Alexander Barton Date: Fri, 6 Jan 2012 18:55:21 +0000 (+0100) Subject: LIST command: compare pattern case insensitive X-Git-Tag: rel-19-rc1~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdfc27265ef27e445de89217d08f9a57219355df;p=ngircd LIST command: compare pattern case insensitive --- diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c index c5eb369d..94a8a4d7 100644 --- a/src/ngircd/irc-channel.c +++ b/src/ngircd/irc-channel.c @@ -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)) {