0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 16:34:13 +01:00
construct/include/cache.h

52 lines
1,019 B
C
Raw Normal View History

2008-04-13 17:54:23 +02:00
#ifndef INCLUDED_CACHE_H
#define INCLUDED_CACHE_H
#include "rb_dictionary.h"
2008-04-13 17:54:23 +02:00
#define HELP_MAX 100
#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;
2008-04-13 17:54:23 +02:00
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);
extern rb_dictionary *help_dict_oper;
extern rb_dictionary *help_dict_user;
2008-04-13 17:54:23 +02:00
#endif