]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/xline.h
MAXMODES+1 -> MAXMODES+2
[user/henk/code/inspircd.git] / include / xline.h
index 0aa831670582eba64814083a5fe5047bcb96a940..30d8abd3ac1baad3e63d06142c72be5cb1718670 100644 (file)
@@ -31,7 +31,7 @@ const int APPLY_ALL           = APPLY_GLINES | APPLY_KLINES | APPLY_QLINES | APPLY_ZLINES
 
 /** XLine is the base class for ban lines such as G lines and K lines.
  */
-class XLine : public classbase
+class CoreExport XLine : public classbase
 {
   public:
 
@@ -71,7 +71,7 @@ class XLine : public classbase
 
 /** KLine class
  */
-class KLine : public XLine
+class CoreExport KLine : public XLine
 {
   public:
        /** Hostmask (ident@host) to match against
@@ -95,7 +95,7 @@ class KLine : public XLine
 
 /** GLine class
  */
-class GLine : public XLine
+class CoreExport GLine : public XLine
 {
   public:
        /** Hostmask (ident@host) to match against
@@ -119,12 +119,12 @@ class GLine : public XLine
 
 /** ELine class
  */
-class ELine : public XLine
+class CoreExport ELine : public XLine
 {
   public:
-        /** Hostmask (ident@host) to match against
-         * May contain wildcards.
-         */
+       /** Hostmask (ident@host) to match against
+        * May contain wildcards.
+        */
        ELine(time_t s_time, long d, const char* src, const char* re, const char* ident, const char* host) : XLine(s_time, d, src, re)
        {
                identmask = strdup(ident);
@@ -138,12 +138,12 @@ class ELine : public XLine
        }
 
        char* identmask;
-        char* hostmask;
+       char* hostmask;
 };
 
 /** ZLine class
  */
-class ZLine : public XLine
+class CoreExport ZLine : public XLine
 {
   public:
        /** IP Address (xx.yy.zz.aa) to match against
@@ -164,7 +164,7 @@ class ZLine : public XLine
 
 /** QLine class
  */
-class QLine : public XLine
+class CoreExport QLine : public XLine
 {
   public:
        /** Nickname to match against.
@@ -202,7 +202,7 @@ typedef std::pair<std::string, std::string> IdentHostPair;
 
 /** XLineManager is a class used to manage glines, klines, elines, zlines and qlines.
  */
-class XLineManager
+class CoreExport XLineManager
 {
  protected:
        /** The owner/creator of this class
@@ -316,34 +316,39 @@ class XLineManager
        bool add_eline(long duration, const char* source, const char* reason, const char* hostmask);
 
        /** Delete a GLine
-        * @return hostmask The host to remove
+        * @param hostmask The host to remove
+        * @param simulate If this is true, don't actually remove the line, just return
         * @return True if the line was deleted successfully
         */
-       bool del_gline(const char* hostmask);
+       bool del_gline(const char* hostmask, bool simulate = false);
 
        /** Delete a QLine
-        * @return nickname The nick to remove
+        * @param nickname The nick to remove
+        * @param simulate If this is true, don't actually remove the line, just return
         * @return True if the line was deleted successfully
         */
-       bool del_qline(const char* nickname);
+       bool del_qline(const char* nickname, bool simulate = false);
 
        /** Delete a ZLine
-        * @return ipaddr The IP to remove
+        * @param ipaddr The IP to remove
+        * @param simulate If this is true, don't actually remove the line, just return
         * @return True if the line was deleted successfully
         */
-       bool del_zline(const char* ipaddr);
+       bool del_zline(const char* ipaddr, bool simulate = false);
 
        /** Delete a KLine
-        * @return hostmask The host to remove
+        * @param hostmask The host to remove
+        * @param simulate If this is true, don't actually remove the line, just return
         * @return True if the line was deleted successfully
         */
-       bool del_kline(const char* hostmask);
+       bool del_kline(const char* hostmask, bool simulate = false);
 
        /** Delete a ELine
-        * @return hostmask The host to remove
+        * @param hostmask The host to remove
+        * @param simulate If this is true, don't actually remove the line, just return
         * @return True if the line was deleted successfully
         */
-       bool del_eline(const char* hostmask);
+       bool del_eline(const char* hostmask, bool simulate = false);
 
        /** Check if a nickname matches a QLine
         * @return nick The nick to check against
@@ -442,3 +447,4 @@ class XLineManager
 };
 
 #endif
+