]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/configreader.h
Add support for length arguments in getString.
[user/henk/code/inspircd.git] / include / configreader.h
index 4d70d8510ac25660258f2d4092da6d66fd69b0ab..1a0e700808871b9ec10c3f8a2ef9676098464259 100644 (file)
@@ -42,7 +42,7 @@ class CoreExport ConfigTag : public refcountbase
        const int src_line;
 
        /** Get the value of an option, using def if it does not exist */
-       std::string getString(const std::string& key, const std::string& def = "");
+       std::string getString(const std::string& key, const std::string& def = "", size_t minlen = 0, size_t maxlen = UINT32_MAX);
        /** Get the value of an option, using def if it does not exist */
        long getInt(const std::string& key, long def = 0, long min = LONG_MIN, long max = LONG_MAX);
        /** Get the value of an option, using def if it does not exist */
@@ -122,7 +122,7 @@ class ServerLimits
         */
        ServerLimits(ConfigTag* tag);
 
-       /** Maximum length of a n!u@h mask */
+       /** Maximum length of a n!u\@h mask */
        size_t GetMaxMask() const { return NickMax + 1 + IdentMax + 1 + MaxHost; }
 };
 
@@ -216,11 +216,7 @@ class CoreExport ServerConfig
                /** Module path */
                std::string Module;
 
-               ServerPaths()
-                       : Config(INSPIRCD_CONFIG_PATH)
-                       , Data(INSPIRCD_DATA_PATH)
-                       , Log(INSPIRCD_LOG_PATH)
-                       , Module(INSPIRCD_MODULE_PATH) { }
+               ServerPaths(ConfigTag* tag);
 
                std::string PrependConfig(const std::string& fn) const { return FileSystem::ExpandPath(Config, fn); }
                std::string PrependData(const std::string& fn) const { return FileSystem::ExpandPath(Data, fn); }
@@ -340,11 +336,6 @@ class CoreExport ServerConfig
         */
        bool RestrictBannedUsers;
 
-       /** The number of seconds the DNS subsystem
-        * will wait before timing out any request.
-        */
-       int dns_timeout;
-
        /** The size of the read() buffer in the user
         * handling code, used to read data into a user's
         * recvQ.