]> jfr.im git - irc/quakenet/newserv.git/blame - helpmod2/hticket.h
Merge pull request #1 from meeb/meeb
[irc/quakenet/newserv.git] / helpmod2 / hticket.h
CommitLineData
c86edd1d
Q
1/* hchannel invite ticket */
2/* currently uses a list, if it's insufficient a faster datastructure will be used */
3#ifndef HTICKET_H
4#define HTICKET_H
5
6#include <time.h>
7
c86edd1d 8#include "../irc/irc_config.h"
052247fa
CP
9
10#include "hdef.h"
c86edd1d
Q
11
12#define HTICKET_EXPIRATION_TIME (2 * HDEF_d)
13
14typedef struct hticket_struct
15{
16 char authname[ACCOUNTLEN +1];
17 time_t time_expiration;
052247fa 18 sstring *message;
c86edd1d
Q
19 struct hticket_struct *next;
20} hticket;
21
3a839281 22hticket *hticket_get(const char *, struct hchannel_struct*);
c86edd1d 23hticket *hticket_del(hticket *, struct hchannel_struct*);
052247fa 24hticket *hticket_add(const char *, time_t expiration, struct hchannel_struct*, const char *);
c86edd1d
Q
25int hticket_count(void);
26void hticket_remove_expired(void);
27
28#endif