X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/9b24cbdecc72337e825764f39cdf59ca23f41788..dd3355732b392f8be9f326feb1849b2f46c9a1fc:/include/match.h diff --git a/include/match.h b/include/match.h index 151ad4bf..7840c291 100644 --- a/include/match.h +++ b/include/match.h @@ -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