X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fmatch.c;fp=src%2Fngircd%2Fmatch.c;h=0f9009df815469ac9a97377127dc50cb72fe9bc3;hp=8f2fa2a60da60e2fb4a52b8a402e85c1aa7edd55;hb=d4eb55c79fb130844a08279cd574a19f188ffa99;hpb=2546a13ad2949192eb70bf21e114ec60af287ee4 diff --git a/src/ngircd/match.c b/src/ngircd/match.c index 8f2fa2a6..0f9009df 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,19 @@ 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)); + + ngt_LowerStr(haystack); + + return Match(pattern, haystack); +} /* MatchCaseInsensitive */ + + static int Matche( const char *p, const char *t ) {