4 // include the common header files
16 /** XLine is the base class for ban lines such as G lines and K lines.
18 class XLine : public classbase
22 /** The time the line was added.
26 /** The duration of the ban, or 0 if permenant
30 /** Source of the ban. This can be a servername or an oper nickname
34 /** Reason for the ban
38 /** Number of times the core matches the ban, for statistics
46 class KLine : public XLine
49 /** Hostmask (ident@host) to match against
50 * May contain wildcards.
52 char hostmask[MAXBUF];
57 class GLine : public XLine
60 /** Hostmask (ident@host) to match against
61 * May contain wildcards.
63 char hostmask[MAXBUF];
68 class ZLine : public XLine
71 /** IP Address (xx.yy.zz.aa) to match against
72 * May contain wildcards.
79 class QLine : public XLine
82 /** Nickname to match against.
83 * May contain wildcards.
88 void read_xline_defaults();
90 void add_gline(long duration, char* source, char* reason, char* hostmask);
91 void add_qline(long duration, char* source, char* reason, char* nickname);
92 void add_zline(long duration, char* source, char* reason, char* ipaddr);
93 void add_kline(long duration, char* source, char* reason, char* hostmask);
95 bool del_gline(char* hostmask);
96 bool del_qline(char* nickname);
97 bool del_zline(char* ipaddr);
98 bool del_kline(char* hostmask);
100 char* matches_qline(const char* nick);
101 char* matches_gline(const char* host);
102 char* matches_zline(const char* ipaddr);
103 char* matches_kline(const char* host);
108 void stats_k(userrec* user);
109 void stats_g(userrec* user);
110 void stats_q(userrec* user);
111 void stats_z(userrec* user);