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