Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / ircd_string.c
index 4976e134dd1a15d9f4281a95fb8e1c9692294288..359d36edd0e4624367c71ff5b6dfe4d9dd78319e 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "ircd_string.h"
 #include "ircd_defs.h"
 #include "ircd_chattr.h"
@@ -75,6 +77,20 @@ int string_is_address(const char* str)
   return (0 == regexec(&addrRegex, str, 0, 0, 0));
 }
 
+int string_has_wildcards(const char* str)
+{
+  assert(0 != str);
+  for ( ; *str; ++str) {
+    if ('\\' == *str) {
+      if ('\0' == *++str)
+        break;
+    }
+    else if ('*' == *str || '?' == *str)
+      return 1;
+  }
+  return 0;
+}
+
 /*
  * strtoken.c
  *