]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/lists.c
Match list patterns case-insensitive
[ngircd-alex.git] / src / ngircd / lists.c
index ab2aeb3c32069fec47fa101d44660749db22ba27..247344e508a6e3daf3fc164d1e47ddbdc0e98152 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -285,6 +285,7 @@ Lists_MakeMask(const char *Pattern, char *mask, size_t len)
                strlcpy(mask, Pattern, len - 5);
                strlcat(mask, "!*@", len);
                strlcat(mask, at, len);
+               at--; *at = '@';
        } else {
                /* All parts (nick, user and domain name) are given */
                strlcpy(mask, Pattern, len);
@@ -325,7 +326,7 @@ Lists_CheckReason(struct list_head *h, CLIENT *Client, char *reason, size_t len)
 
        while (e) {
                next = e->next;
-               if (Match(e->mask, Client_MaskCloaked(Client))) {
+               if (MatchCaseInsensitive(e->mask, Client_MaskCloaked(Client))) {
                        if (len && e->reason)
                                strlcpy(reason, e->reason, len);
                        if (e->valid_until == 1) {