]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/configreader.h
And whoops, typo
[user/henk/code/inspircd.git] / include / configreader.h
index 2bb7af091217e5fef51d2a8038dca673a4cc095a..617059cf44c5584a5b9bef9c157d393937838d72 100644 (file)
@@ -44,7 +44,12 @@ enum ConfigDataType
        DT_INTEGER       = 1,           /* Integer */
        DT_CHARPTR       = 2,           /* Char pointer */
        DT_BOOLEAN       = 3,           /* Boolean */
-       DT_ALLOW_NEWLINE = 128          /* New line characters allowed */
+       DT_HOSTNAME      = 4,           /* Hostname syntax */
+       DT_NOSPACES      = 5,           /* No spaces */
+       DT_IPADDRESS     = 6,           /* IP address (v4, v6) */
+       DT_CHANNEL       = 7,           /* Channel name */
+       DT_ALLOW_WILD    = 64,          /* Allow wildcards/CIDR in DT_IPADDRESS */
+       DT_ALLOW_NEWLINE = 128          /* New line characters allowed in DT_CHARPTR */
 };
 
 /** Holds a config value, either string, integer or boolean.
@@ -235,7 +240,7 @@ class CoreExport ServerConfig : public Extensible
 
        /** Check that there is only one of each configuration item
         */
-       bool CheckOnce(char* tag) throw (CoreException);
+       bool CheckOnce(char* tag);
   
   public:
 
@@ -494,23 +499,10 @@ class CoreExport ServerConfig : public Extensible
         */
        ClassVector Classes;
 
-       /** A list of module names (names only, no paths)
-        * which are currently loaded by the server.
-        */
-       std::vector<std::string> module_names;
-
        /** A list of the classes for listening client ports
         */
        std::vector<ListenSocket*> ports;
 
-       /** Boolean sets of which modules implement which functions
-        */
-       char implement_lists[255][255];
-
-       /** Global implementation list
-        */
-       char global_implementation[255];
-
        /** A list of ports claimed by IO Modules
         */
        std::map<int,Module*> IOHookModule;
@@ -713,6 +705,12 @@ class CoreExport ServerConfig : public Extensible
        /** Returns the numbers of vars inside the index'th 'tag in the config file
         */
        int ConfVarEnum(ConfigDataHash &target, const std::string &tag, int index);
+
+       void ValidateHostname(const char* p, const std::string &tag, const std::string &val);
+
+       void ValidateIP(const char* p, const std::string &tag, const std::string &val, bool wild);
+
+       void ValidateNoSpaces(const char* p, const std::string &tag, const std::string &val);
        
        /** Get a pointer to the module which has hooked the given port.
         * @parameter port Port number
@@ -803,5 +801,30 @@ bool DoClass(ServerConfig* conf, const char* tag, char** entries, ValueList &val
  */
 bool DoneClassesAndTypes(ServerConfig* conf, const char* tag);
 
+
+
+/** Initialize x line
+ */
+bool InitXLine(ServerConfig* conf, const char* tag);
+/** Add a config-defined zline
+ */
+bool DoZLine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
+
+/** Add a config-defined qline
+ */
+bool DoQLine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
+
+/** Add a config-defined kline
+ */
+bool DoKLine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
+
+/** Add a config-defined eline
+ */
+bool DoELine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
+
+
+
+
 #endif