unsigned int status; /* If CONF_ILLEGAL, delete when no clients */
unsigned int flags;
int clients; /* Number of *LOCAL* clients using this */
- char *name; /* IRC name, nick, server name, or original u@h */
+ union
+ {
+ char *name; /* IRC name, nick, server name, or original u@h */
+ const char *oper;
+ } info;
char *host; /* host part of user@host */
char *passwd; /* doubles as kline reason *ugh* */
char *spasswd; /* Password to send. */
char *user; /* user part of user@host */
int port;
time_t hold; /* Hold action until this time (calendar time) */
+ time_t created; /* Creation time (for klines etc) */
char *className; /* Name of class */
struct Class *c_class; /* Class of connection */
rb_patricia_node_t *pnode; /* Our patricia node */
/* Macros for struct ConfItem */
+#define IsConfBan(x) ((x)->status & (CONF_KILL|CONF_XLINE|CONF_DLINE|\
+ CONF_RESV_CHANNEL|CONF_RESV_NICK))
+
#define IsNoTilde(x) ((x)->flags & CONF_FLAGS_NO_TILDE)
#define IsNeedIdentd(x) ((x)->flags & CONF_FLAGS_NEED_IDENTD)
#define IsConfExemptKline(x) ((x)->flags & CONF_FLAGS_EXEMPTKLINE)
{
const char *dpath; /* DPATH if set from command line */
const char *configfile;
- const char *klinefile;
- const char *dlinefile;
- const char *xlinefile;
- const char *resvfile;
char *egdpool_path;
extern char *show_iline_prefix(struct Client *, struct ConfItem *, char *);
extern void get_printable_conf(struct ConfItem *,
char **, char **, char **, char **, int *, char **);
+extern char *get_user_ban_reason(struct ConfItem *aconf);
extern void get_printable_kline(struct Client *, struct ConfItem *,
char **, char **, char **, char **);
extern void conf_add_d_conf(struct ConfItem *);
extern void flush_expired_ips(void *);
-
-/* XXX consider moving these into kdparse.h */
-extern void parse_k_file(FILE * fb);
-extern void parse_d_file(FILE * fb);
-extern void parse_x_file(FILE * fb);
-extern void parse_resv_file(FILE *);
-extern char *getfield(char *newline);
-extern char *xline_encode_spaces(const char *);
-
extern char *get_oper_name(struct Client *client_p);
extern int yylex(void);