]> jfr.im git - irc/rqf/shadowircd.git/blob - include/cache.h
monitor.{c,h} stuff for libratbox3.
[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
7 #define HELP_MAX 100
8
9 #define CACHELINELEN 81
10 #define CACHEFILELEN 30
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
36 extern void init_cache(void);
37 extern struct cachefile *cache_file(const char *, const char *, int);
38 extern void free_cachefile(struct cachefile *);
39
40 extern void load_help(void);
41
42 extern void send_user_motd(struct Client *);
43 extern void send_oper_motd(struct Client *);
44
45 struct Dictionary;
46 extern struct Dictionary *help_dict_oper;
47 extern struct Dictionary *help_dict_user;
48
49 #endif
50