]> jfr.im git - irc/rqf/shadowircd.git/blame - include/cache.h
[svn] DNSBL keyword substitution is available as of 2.1.3.
[irc/rqf/shadowircd.git] / include / cache.h
CommitLineData
212380e3 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
18struct Client;
19
20struct cachefile
21{
22 char name[CACHEFILELEN];
23 dlink_list contents;
24 int flags;
25};
26
27struct cacheline
28{
29 char data[CACHELINELEN];
30 dlink_node linenode;
31};
32
33extern struct cachefile *user_motd;
34extern struct cachefile *oper_motd;
35extern struct cacheline *emptyline;
36extern dlink_list links_cache_list;
37
38extern char user_motd_changed[MAX_DATE_STRING];
39
40extern void init_cache(void);
41extern struct cachefile *cache_file(const char *, const char *, int);
42extern void cache_links(void *unused);
43extern void free_cachefile(struct cachefile *);
44
45extern void load_help(void);
46
47extern void send_user_motd(struct Client *);
48extern void send_oper_motd(struct Client *);
49
50#endif
51