X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fconfigreader.h;h=1a0e700808871b9ec10c3f8a2ef9676098464259;hb=c0ca5c8d41a71eae4ec132e492b546fa03510871;hp=4d70d8510ac25660258f2d4092da6d66fd69b0ab;hpb=ff3b706b2506d7614bce5e54bc88657bd62ebd4d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/configreader.h b/include/configreader.h index 4d70d8510..1a0e70080 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -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.