]> jfr.im git - irc/rqf/shadowircd.git/blob - include/cache.h
[svn] - the new plan:
[irc/rqf/shadowircd.git] / include / cache.h
1 /* $Id: cache.h 6 2005-09-10 01:02:21Z nenolod $ */
2 #ifndef INCLUDED_CACHE_H
3 #define INCLUDED_CACHE_H
4
5 #include "client.h"
6 #include "tools.h"
7
8 #define HELP_MAX 100
9
10 #define CACHELINELEN 81
11 #define CACHEFILELEN 30
12 /* two servernames, a gecos, three spaces, ":1", '\0' */
13 #define LINKSLINELEN (HOSTLEN + HOSTLEN + REALLEN + 6)
14
15 #define HELP_USER 0x001
16 #define HELP_OPER 0x002
17
18 struct Client;
19
20 struct cachefile
21 {
22 char name[CACHEFILELEN];
23 dlink_list contents;
24 int flags;
25 };
26
27 struct cacheline
28 {
29 char data[CACHELINELEN];
30 dlink_node linenode;
31 };
32
33 extern struct cachefile *user_motd;
34 extern struct cachefile *oper_motd;
35 extern struct cacheline *emptyline;
36 extern dlink_list links_cache_list;
37
38 extern char user_motd_changed[MAX_DATE_STRING];
39
40 extern void init_cache(void);
41 extern struct cachefile *cache_file(const char *, const char *, int);
42 extern void cache_links(void *unused);
43 extern void free_cachefile(struct cachefile *);
44
45 extern void load_help(void);
46
47 extern void send_user_motd(struct Client *);
48 extern void send_oper_motd(struct Client *);
49
50 #endif
51