]> jfr.im git - irc/quakenet/newserv.git/blame - helpmod2/hlamer.h
Added files that weren't in the initial import.
[irc/quakenet/newserv.git] / helpmod2 / hlamer.h
CommitLineData
c86edd1d
Q
1/* H lamer control */
2#ifndef HLAMER_H
3#define HLAMER_H
4
5#include "../lib/sstring.h"
6
7#define HLC_DEFAULT_BANTIME (60 * 60 * 24)
8
9typedef enum
10{
11 HLC_CAPS,
12 HLC_REPEAT,
13 HLC_CHARACTER_REPEAT,
14 HLC_FLOOD,
15 HLC_SPAM
16} hlc_violation;
17
18typedef struct hlamercontrol_profile_struct
19{
20 sstring *name;
21
22 int caps_max_percentage;
23 int caps_min_count;
24
25 int repeats_max_count;
26 int repeats_min_length;
27
28 int symbol_repeat_max_count;
29 int character_repeat_max_count;
30 int symbol_max_count;
31
32 int tolerance_flood;
33
34 int tolerance_spam;
35 float constant_spam;
36
37 int tolerance_warn;
38 int tolerance_kick;
39 int tolerance_remove;
40
41 struct hlamercontrol_profile_struct *next;
42} hlc_profile;
43
44extern hlc_profile *hlc_profiles;
45/* just adds a profile, does NOT set any values */
46hlc_profile* hlc_add(const char *);
47hlc_profile *hlc_del(hlc_profile *);
48void hlc_del_all(void);
49hlc_profile *hlc_get(const char *);
50
51/* checks a string for lameness, returns non-zero if lameness is present and user is kicked */
52/* the first parameter is hchannel* and second is huser*, but since hchannel.h includes hlamer.h, this is needed */
53int hlc_check(void *, void*, const char *);
54
55#endif