]> jfr.im git - solanum.git/commitdiff
[svn] Use mask_match() to check bans from local clients for
authorjilles <redacted>
Sat, 14 Jul 2007 13:34:50 +0000 (06:34 -0700)
committerjilles <redacted>
Sat, 14 Jul 2007 13:34:50 +0000 (06:34 -0700)
redundancy. This fixes the problem that bans like *!?@*
prevent any ban starting with *!*@ being set.

ChangeLog
include/serno.h
src/chmode.c

index e8025be328a6680c63d1aee0fcf6da462cc434bc..7612cc0567ebf4362fa9e71a7551316da3ee38fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+jilles      2007/07/14 13:32:18 UTC    (20070714-3532)
+  Log:
+  Add mask_match(), like ircu mmatch().
+  This compares two masks and returns whether the "new" is
+  more specific than or equal to the "old". The difference
+  with match() is that a '?' in "old" does not match a '*' in
+  "new".
+  
+
+  Changes:     Modified:
+  +2 -0                trunk/include/irc_string.h (File Modified) 
+  +73 -0       trunk/src/match.c (File Modified) 
+
+
 jilles      2007/07/14 12:20:48 UTC    (20070714-3530)
   Log:
   add_id() for local client: do not collapse() the ban mask.
index fc6dd76bdc78b9b1a9fee60229169dbf9231f962..6bab781a42c25c316fd9495a8280584270895f48 100644 (file)
@@ -1 +1 @@
-#define SERNO "20070714-3530"
+#define SERNO "20070714-3532"
index 5fd08581a63017ae4ead799430cdb0e65eae4587..e7bd9bcc8c05e68d988ac62ec26b6f519b280ccf 100644 (file)
@@ -22,7 +22,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: chmode.c 3530 2007-07-14 12:20:48Z jilles $
+ *  $Id: chmode.c 3534 2007-07-14 13:34:50Z jilles $
  */
 
 #include "stdinc.h"
@@ -111,7 +111,7 @@ add_id(struct Client *source_p, struct Channel *chptr, const char *banid,
                DLINK_FOREACH(ptr, list->head)
                {
                        actualBan = ptr->data;
-                       if(match(actualBan->banstr, realban))
+                       if(mask_match(actualBan->banstr, realban))
                                return 0;
                }
        }