summaryrefslogtreecommitdiff
path: root/include/xline.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-24 18:15:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-24 18:15:37 +0000
commit800ebbf95d489010e3a99b4975c9b864d96cd0d2 (patch)
tree465b51c30eb37a3393f129ed1bb325df1e2b8298 /include/xline.h
parentc6c17f59976470df912d58a8ab35fe9d823dfe76 (diff)
Added a bunch of xline stuff and added qline spport for /nick and svsnick
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@713 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/xline.h')
-rw-r--r--include/xline.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/include/xline.h b/include/xline.h
index 0532ad207..f66583ae6 100644
--- a/include/xline.h
+++ b/include/xline.h
@@ -17,6 +17,7 @@
*/
class XLine : public classbase
{
+ public:
/** The time the line was added.
*/
@@ -40,37 +41,69 @@ class XLine : public classbase
};
+/** KLine class
+ */
class KLine : public XLine
{
+ public:
/** Hostmask (ident@host) to match against
* May contain wildcards.
*/
char hostmask[MAXBUF];
};
+/** GLine class
+ */
class GLine : public XLine
{
+ public:
/** Hostmask (ident@host) to match against
* May contain wildcards.
*/
char hostmask[MAXBUF];
};
+/** ZLine class
+ */
class ZLine : public XLine
{
+ public:
/** IP Address (xx.yy.zz.aa) to match against
- * May contain wildcards and may be CIDR
+ * May contain wildcards.
*/
char ipaddr[MAXBUF];
};
+/** QLine class
+ */
class QLine : public XLine
{
+ public:
/** Nickname to match against.
* May contain wildcards.
*/
char nick[MAXBUF];
};
+void read_xline_defaults();
+
+void add_gline(long duration, char* source, char* reason, char* hostmask);
+void add_qline(long duration, char* source, char* reason, char* nickname);
+void add_zline(long duration, char* source, char* reason, char* ipaddr);
+void add_kline(long duration, char* source, char* reason, char* hostmask);
+
+bool del_gline(char* hostmask);
+bool del_qline(char* nickname);
+bool del_zline(char* ipaddr);
+bool del_kline(char* hostmask);
+
+char* matches_qline(const char* nick);
+char* matches_gline(const char* host);
+char* matches_zline(const char* ipaddr);
+char* matches_kline(const char* host);
+
+void expire_lines();
+void apply_lines();
+
#endif