]> jfr.im git - irc/quakenet/newserv.git/blame - helpmod2/haccount.h
GLINES: fix null pointer deref in trustgline / trustungline
[irc/quakenet/newserv.git] / helpmod2 / haccount.h
CommitLineData
c86edd1d
Q
1/* new H accounts */
2#ifndef HACCOUNT_H
3#define HACCOUNT_H
4
5#include <time.h>
6
7#include "../lib/sstring.h"
8
9#include "../nick/nick.h"
10
11#include "hdef.h"
12#include "hstat.h"
13
14enum
15{
16 H_ALL_PRIVMSG = 1 << 0,
17 H_ALL_NOTICE = 1 << 1,
18 H_NOSPAM = 1 << 2,
19 H_AUTO_OP = 1 << 3,
20 H_AUTO_VOICE = 1 << 4,
04f3fbba 21 H_NO_CMD_ERROR = 1 << 5,
9af95c3d 22 H_NO_EXPIRE = 1 << 31
c86edd1d
Q
23};
24
9af95c3d 25#define H_ACCFLAGS_DEFAULT (0)
c86edd1d 26
04f3fbba 27#define HACCOUNT_CONF_COUNT 5
c86edd1d
Q
28
29typedef struct haccount_struct
30{
31 sstring *name;
32 int flags;
33 hlevel level;
34
35 time_t last_activity;
36 hstat_account *stats;
37
38 struct haccount_struct *next;
39} haccount;
40
41extern struct haccount_struct *haccounts;
42
43haccount *haccount_get_by_name(const char*);
44haccount *haccount_add(const char*, hlevel);
45int haccount_del(haccount*);
46
47void haccount_clear_inactives(void);
48
49void haccount_set_level(haccount*, hlevel);
50
51const char *haccount_get_state(haccount*, int);
52const char *haccount_get_sname(int);
53
54int haccount_count(hlevel);
55
56#endif