]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/match.c
Cleaned up PRIVMSG and NOTICE patches.
[ngircd-alex.git] / src / ngircd / match.c
index 8f2fa2a60da60e2fb4a52b8a402e85c1aa7edd55..0f9009df815469ac9a97377127dc50cb72fe9bc3 100644 (file)
@@ -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 )
 {