]> jfr.im git - irc/quakenet/newserv.git/blob - helpmod2/haccount.h
Initial Import
[irc/quakenet/newserv.git] / helpmod2 / haccount.h
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
14 enum
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,
21 H_EXPIRES = 1 << 31
22 };
23
24 #define H_ACCFLAGS_DEFAULT 0
25
26 #define HACCOUNT_CONF_COUNT 4
27
28 typedef struct haccount_struct
29 {
30 sstring *name;
31 int flags;
32 hlevel level;
33
34 time_t last_activity;
35 hstat_account *stats;
36
37 struct haccount_struct *next;
38 } haccount;
39
40 extern struct haccount_struct *haccounts;
41
42 haccount *haccount_get_by_name(const char*);
43 haccount *haccount_add(const char*, hlevel);
44 int haccount_del(haccount*);
45
46 void haccount_clear_inactives(void);
47
48 void haccount_set_level(haccount*, hlevel);
49
50 const char *haccount_get_state(haccount*, int);
51 const char *haccount_get_sname(int);
52
53 int haccount_count(hlevel);
54
55 #endif