File: cache.h

package info (click to toggle)
charybdis 3.4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 9,316 kB
  • sloc: ansic: 125,437; sh: 11,375; makefile: 926; yacc: 274; lex: 240; perl: 3
file content (52 lines) | stat: -rw-r--r-- 1,112 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* $Id: cache.h 24250 2007-08-22 19:15:08Z androsyn $ */
#ifndef INCLUDED_CACHE_H
#define INCLUDED_CACHE_H

#define HELP_MAX	100

#define CACHELINELEN	81
#define CACHEFILELEN	30
/* two servernames, a gecos, three spaces, ":1", '\0' */
#define LINKSLINELEN	(HOSTLEN + HOSTLEN + REALLEN + 6)

#define HELP_USER	0x001
#define HELP_OPER	0x002

struct Client;

struct cachefile
{
	char name[CACHEFILELEN];
	rb_dlink_list contents;
	int flags;
};

struct cacheline
{
	char data[CACHELINELEN];
	rb_dlink_node linenode;
};

extern struct cachefile *user_motd;
extern struct cachefile *oper_motd;
extern struct cacheline *emptyline;

extern char user_motd_changed[MAX_DATE_STRING];
extern rb_dlink_list links_cache_list;

void init_cache(void);
struct cachefile *cache_file(const char *, const char *, int);
void cache_links(void *unused);
void free_cachefile(struct cachefile *);

void load_help(void);

void send_user_motd(struct Client *);
void send_oper_motd(struct Client *);
void cache_user_motd(void);

struct Dictionary;
extern struct Dictionary *help_dict_oper;
extern struct Dictionary *help_dict_user;
#endif