0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-08 13:08:56 +02:00

[svn] Use mask_match() to check bans from local clients for

redundancy. This fixes the problem that bans like *!?@*
prevent any ban starting with *!*@ being set.
This commit is contained in:
jilles 2007-07-14 06:34:50 -07:00
parent df251055ca
commit fd488ac17a
3 changed files with 17 additions and 3 deletions

View file

@ -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.

View file

@ -1 +1 @@
#define SERNO "20070714-3530"
#define SERNO "20070714-3532"

View 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;
}
}