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
*/
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