]> jfr.im git - solanum.git/blobdiff - include/match.h
m_starttls: advertise tls cap only if SSL is possible
[solanum.git] / include / match.h
index 151ad4bf669527ad734d6affbddf5dba172f591d..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
  */
@@ -87,7 +98,7 @@ extern const unsigned char irctolower_tab[];
 extern const unsigned char irctoupper_tab[];
 #define irctoupper(c) (irctoupper_tab[(unsigned char)(c)])
 
-extern const unsigned int CharAttrs[];
+extern unsigned int CharAttrs[];
 
 #define PRINT_C   0x001
 #define CNTRL_C   0x002