X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fmatch.c;h=5e97e71fc15e5476b2f7935b75d2a0d4ebc35330;hp=8f2fa2a60da60e2fb4a52b8a402e85c1aa7edd55;hb=a988bbc86aed404b7bcfdbceafc030ea4bc5ecab;hpb=61966a6088f770ff28b6209a484b44aaf478dbd6 diff --git a/src/ngircd/match.c b/src/ngircd/match.c index 8f2fa2a6..5e97e71f 100644 --- a/src/ngircd/match.c +++ b/src/ngircd/match.c @@ -22,6 +22,8 @@ static char UNUSED id[] = "$Id: match.c,v 1.5 2006/10/06 21:23:47 fw Exp $"; #include "exp.h" #include "match.h" +#include "defines.h" +#include "tool.h" /* @@ -53,6 +55,16 @@ Match( const char *Pattern, const char *String ) } /* Match */ +GLOBAL bool +MatchCaseInsensitive(const char *pattern, const char *searchme) +{ + char haystack[COMMAND_LEN]; + + strlcpy(haystack, searchme, sizeof(haystack)); + return Match(pattern, ngt_LowerStr(haystack)); +} /* MatchCaseInsensitive */ + + static int Matche( const char *p, const char *t ) {