]> jfr.im git - solanum.git/blame - include/cache.h
Merge pull request #162 from maxteufel/umode_noctcp
[solanum.git] / include / cache.h
CommitLineData
8bd5767b
JT
1#ifndef INCLUDED_CACHE_H
2#define INCLUDED_CACHE_H
3
4#define HELP_MAX 100
5
8bd5767b
JT
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
13struct Client;
14
15struct cachefile
16{
17 char name[CACHEFILELEN];
18 rb_dlink_list contents;
19 int flags;
20};
21
22struct cacheline
23{
3dae60ef 24 char *data;
8bd5767b
JT
25 rb_dlink_node linenode;
26};
27
28extern struct cachefile *user_motd;
29extern struct cachefile *oper_motd;
30extern struct cacheline *emptyline;
31
32extern char user_motd_changed[MAX_DATE_STRING];
33extern rb_dlink_list links_cache_list;
34
35void init_cache(void);
36struct cachefile *cache_file(const char *, const char *, int);
37void cache_links(void *unused);
38void free_cachefile(struct cachefile *);
39
40void load_help(void);
41
42void send_user_motd(struct Client *);
43void send_oper_motd(struct Client *);
44void cache_user_motd(void);
45
46struct Dictionary;
47extern struct Dictionary *help_dict_oper;
48extern struct Dictionary *help_dict_user;
49#endif
50