]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/xline.h
Added XLine stuff
[user/henk/code/inspircd.git] / include / xline.h
1 #ifndef __XLINE_H
2 #define __XLINE_H
3
4 // include the common header files
5
6 #include <typeinfo>
7 #include <iostream>
8 #include <string>
9 #include <deque>
10 #include <sstream>
11 #include <vector>
12 #include "users.h"
13 #include "channels.h"
14
15
16 /** XLine is the base class for ban lines such as G lines and K lines.
17  */
18 class XLine : public classbase
19 {
20
21         /** The time the line was added.
22          */
23         time_t set_time;
24         
25         /** The duration of the ban, or 0 if permenant
26          */
27         long duration;
28         
29         /** Source of the ban. This can be a servername or an oper nickname
30          */
31         char source[MAXBUF];
32         
33         /** Reason for the ban
34          */
35         char reason[MAXBUF];
36         
37         /** Number of times the core matches the ban, for statistics
38          */
39         long n_matches;
40         
41 };
42
43 class KLine : public XLine
44 {
45         /** Hostmask (ident@host) to match against
46          * May contain wildcards.
47          */
48         char hostmask[MAXBUF];
49 };
50
51 class GLine : public XLine
52 {
53         /** Hostmask (ident@host) to match against
54          * May contain wildcards.
55          */
56         char hostmask[MAXBUF];
57 };
58
59 class ZLine : public XLine
60 {
61         /** IP Address (xx.yy.zz.aa) to match against
62          * May contain wildcards and may be CIDR
63          */
64         char ipaddr[MAXBUF];
65 };
66
67 class QLine : public XLine
68 {
69         /** Nickname to match against.
70          * May contain wildcards.
71          */
72         char nick[MAXBUF];
73 };
74
75 #endif
76