]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Merge insp20
[user/henk/code/inspircd.git] / src / configreader.cpp
index af8a15f43defe4618c4948b6b76d455da4f693da..54c32d8464f60811c121b52f0dd54e4f26314833 100644 (file)
@@ -41,6 +41,14 @@ ServerConfig::ServerConfig()
        OperMaxChans = 30;
        c_ipv4_range = 32;
        c_ipv6_range = 128;
+
+       std::vector<KeyVal>* items;
+       EmptyTag = ConfigTag::create("empty", "<auto>", 0, items);
+}
+
+ServerConfig::~ServerConfig()
+{
+       delete EmptyTag;
 }
 
 static void ValidHost(const std::string& p, const std::string& msg)
@@ -707,7 +715,7 @@ ConfigTag* ServerConfig::ConfValue(const std::string &tag)
 {
        ConfigTagList found = config_data.equal_range(tag);
        if (found.first == found.second)
-               return NULL;
+               return EmptyTag;
        ConfigTag* rv = found.first->second;
        found.first++;
        if (found.first != found.second)