X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/e54995b1508e6f5916045b29358fc906dd0f42d4..e6a489940b6b36203567a62b07d8df34301b0d0e:/include/s_conf.h diff --git a/include/s_conf.h b/include/s_conf.h index 6881536..5b91748 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -36,7 +36,6 @@ #include "class.h" #include "client.h" #include "common.h" -#include "patricia.h" struct Client; struct DNSReply; @@ -47,7 +46,7 @@ struct hostent; struct ip_value { - struct irc_sockaddr_storage ip; + struct rb_sockaddr_storage ip; int ip_mask; int type; }; @@ -55,22 +54,26 @@ struct ip_value extern FILE *conf_fbfile_in; extern char conf_line_in[256]; -struct ConfItem -{ - struct ConfItem *next; /* list node pointer */ - 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 */ - 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) */ - char *className; /* Name of class */ - struct Class *c_class; /* Class of connection */ - patricia_node_t *pnode; /* Our patricia node */ +struct ConfItem +{ + unsigned int status; /* If CONF_ILLEGAL, delete when no clients */ + unsigned int flags; + int clients; /* Number of *LOCAL* clients using this */ + + 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) */ + struct Class *c_class; /* Class of connection */ + rb_patricia_node_t *pnode; }; #define CONF_ILLEGAL 0x80000000 @@ -308,7 +311,7 @@ extern struct server_info ServerInfo; /* defined in ircd.c */ extern struct admin_info AdminInfo; /* defined in ircd.c */ /* End GLOBAL section */ -dlink_list service_list; +rb_dlink_list service_list; typedef enum temp_list { @@ -319,8 +322,8 @@ typedef enum temp_list LAST_TEMP_TYPE } temp_list; -dlink_list temp_klines[LAST_TEMP_TYPE]; -dlink_list temp_dlines[LAST_TEMP_TYPE]; +rb_dlink_list temp_klines[LAST_TEMP_TYPE]; +rb_dlink_list temp_dlines[LAST_TEMP_TYPE]; extern void init_s_conf(void); @@ -338,8 +341,8 @@ extern struct ConfItem *find_tkline(const char *, const char *, struct sockaddr extern char *show_iline_prefix(struct Client *, struct ConfItem *, char *); extern void get_printable_conf(struct ConfItem *, char **, char **, char **, char **, int *, char **); -extern void get_printable_kline(struct Client *, struct ConfItem *, - char **, char **, char **, char **); +void get_printable_kline(struct Client *, struct ConfItem *, + const char **, const char **, const char **, const char **); extern void yyerror(const char *); extern int conf_yy_fatal_error(const char *); @@ -359,7 +362,7 @@ extern void write_confitem(KlineType, struct Client *, char *, char *, extern void add_temp_kline(struct ConfItem *); extern void add_temp_dline(struct ConfItem *); extern void report_temp_klines(struct Client *); -extern void show_temp_klines(struct Client *, dlink_list *); +extern void show_temp_klines(struct Client *, rb_dlink_list *); extern const char *get_conf_name(KlineType); extern int rehash(int);