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