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