]> jfr.im git - solanum.git/blobdiff - include/match.h
ircd/authproc.c: avoid crash on lack of any configured DNSBLs
[solanum.git] / include / match.h
index ef7ed8e2cad9a1e6fa35430760d1d02547e6cee3..7840c29136042b44289f0c1f2d46caff629037c0 100644 (file)
@@ -59,6 +59,17 @@ int comp_with_mask_sock(struct sockaddr *addr, struct sockaddr *dest, unsigned i
 extern char *collapse(char *pattern);
 extern char *collapse_esc(char *pattern);
 
+struct matchset {
+       char host[2][NAMELEN + USERLEN + HOSTLEN + 6];
+       char ip[2][NAMELEN + USERLEN + HOSTIPLEN + 6];
+};
+
+struct Client;
+
+void matchset_for_client(struct Client *who, struct matchset *m);
+bool client_matches_mask(struct Client *who, const char *mask);
+bool matches_mask(const struct matchset *m, const char *mask);
+
 /*
  * irccmp - case insensitive comparison of s1 and s2
  */