Author: Bleep <helveytw@home.com>
[ircu2.10.12-pk.git] / ircd / ircd_string.c
index 4976e134dd1a15d9f4281a95fb8e1c9692294288..113f59d8f001e61bd08d9c635c1a832c4a4c55c1 100644 (file)
@@ -75,6 +75,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
  *