X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/994544c294af3bcab070124dfab4967b775435ca..0ba1da59101281fd8c6a91e068ba6dab1b9292dd:/include/cache.h diff --git a/include/cache.h b/include/cache.h index f60b5b9a..095354d8 100644 --- a/include/cache.h +++ b/include/cache.h @@ -1,14 +1,13 @@ -/* $Id: cache.h 6 2005-09-10 01:02:21Z nenolod $ */ #ifndef INCLUDED_CACHE_H #define INCLUDED_CACHE_H -#include "client.h" -#include "tools.h" +#include "rb_dictionary.h" #define HELP_MAX 100 -#define CACHELINELEN 81 #define CACHEFILELEN 30 +/* two servernames, a gecos, three spaces, ":1", '\0' */ +#define LINKSLINELEN (HOSTLEN + HOSTLEN + REALLEN + 6) #define HELP_USER 0x001 #define HELP_OPER 0x002 @@ -18,14 +17,14 @@ struct Client; struct cachefile { char name[CACHEFILELEN]; - dlink_list contents; + rb_dlink_list contents; int flags; }; struct cacheline { - char data[CACHELINELEN]; - dlink_node linenode; + char *data; + rb_dlink_node linenode; }; extern struct cachefile *user_motd; @@ -33,15 +32,20 @@ extern struct cachefile *oper_motd; extern struct cacheline *emptyline; extern char user_motd_changed[MAX_DATE_STRING]; +extern rb_dlink_list links_cache_list; -extern void init_cache(void); -extern struct cachefile *cache_file(const char *, const char *, int); -extern void free_cachefile(struct cachefile *); +void init_cache(void); +struct cachefile *cache_file(const char *, const char *, int); +void cache_links(void *unused); +void free_cachefile(struct cachefile *); -extern void load_help(void); +void load_help(void); -extern void send_user_motd(struct Client *); -extern void send_oper_motd(struct Client *); +void send_user_motd(struct Client *); +void send_oper_motd(struct Client *); +void cache_user_motd(void); +extern rb_dictionary *help_dict_oper; +extern rb_dictionary *help_dict_user; #endif