]> jfr.im git - solanum.git/blob - include/cache.h
appveyor: (re)install mingw-w64-x86_64-libwinpthread-git
[solanum.git] / include / cache.h
1 #ifndef INCLUDED_CACHE_H
2 #define INCLUDED_CACHE_H
3
4 #define HELP_MAX 100
5
6 #define CACHEFILELEN 30
7 /* two servernames, a gecos, three spaces, ":1", '\0' */
8 #define LINKSLINELEN (HOSTLEN + HOSTLEN + REALLEN + 6)
9
10 #define HELP_USER 0x001
11 #define HELP_OPER 0x002
12
13 struct Client;
14
15 struct cachefile
16 {
17 char name[CACHEFILELEN];
18 rb_dlink_list contents;
19 int flags;
20 };
21
22 struct cacheline
23 {
24 char *data;
25 rb_dlink_node linenode;
26 };
27
28 extern struct cachefile *user_motd;
29 extern struct cachefile *oper_motd;
30 extern struct cacheline *emptyline;
31
32 extern char user_motd_changed[MAX_DATE_STRING];
33 extern rb_dlink_list links_cache_list;
34
35 void init_cache(void);
36 struct cachefile *cache_file(const char *, const char *, int);
37 void cache_links(void *unused);
38 void free_cachefile(struct cachefile *);
39
40 void load_help(void);
41
42 void send_user_motd(struct Client *);
43 void send_oper_motd(struct Client *);
44 void cache_user_motd(void);
45
46 struct Dictionary;
47 extern struct Dictionary *help_dict_oper;
48 extern struct Dictionary *help_dict_user;
49 #endif
50