]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Change allocation of UserManager::clientlist to be physically part of the object...
[user/henk/code/inspircd.git] / src / configreader.cpp
index 341414e0d5f8759bca70bfc69aa21108745e1b19..baeffb015f4730c90625b0ad7c4830095b29be21 100644 (file)
@@ -36,7 +36,7 @@ ServerConfig::ServerConfig()
        dns_timeout = 5;
        MaxTargets = 20;
        NetBufferSize = 10240;
-       SoftLimit = ServerInstance->SE->GetMaxFds();
+       SoftLimit = SocketEngine::GetMaxFds();
        MaxConn = SOMAXCONN;
        MaxChans = 20;
        OperMaxChans = 30;
@@ -335,6 +335,7 @@ struct DeprecatedConfig
 static const DeprecatedConfig ChangedConfig[] = {
        { "bind",        "transport",   "",                 "has been moved to <bind:ssl> as of 2.0" },
        { "die",         "value",       "",                 "you need to reread your config" },
+       { "gnutls",      "starttls",    "",                 "has been replaced with m_starttls as of 2.2" },
        { "link",        "autoconnect", "",                 "2.0+ does not use this attribute - define <autoconnect> tags instead" },
        { "link",        "transport",   "",                 "has been moved to <link:ssl> as of 2.0" },
        { "module",      "name",        "m_chanprotect.so", "has been replaced with m_customprefix as of 2.2" },
@@ -365,24 +366,12 @@ void ServerConfig::Fill()
                if (!nsid.empty() && nsid != sid)
                        throw CoreException("You must restart to change the server id");
        }
-       diepass = ConfValue("power")->getString("diepass");
-       restartpass = ConfValue("power")->getString("restartpass");
-       powerhash = ConfValue("power")->getString("hash");
-       PrefixQuit = options->getString("prefixquit");
-       SuffixQuit = options->getString("suffixquit");
-       FixedQuit = options->getString("fixedquit");
-       PrefixPart = options->getString("prefixpart");
-       SuffixPart = options->getString("suffixpart");
-       FixedPart = options->getString("fixedpart");
-       SoftLimit = ConfValue("performance")->getInt("softlimit", ServerInstance->SE->GetMaxFds(), 10, ServerInstance->SE->GetMaxFds());
+       SoftLimit = ConfValue("performance")->getInt("softlimit", SocketEngine::GetMaxFds(), 10, SocketEngine::GetMaxFds());
        CCOnConnect = ConfValue("performance")->getBool("clonesonconnect", true);
        MaxConn = ConfValue("performance")->getInt("somaxconn", SOMAXCONN);
        XLineMessage = options->getString("xlinemessage", options->getString("moronbanner", "You're banned!"));
        ServerDesc = ConfValue("server")->getString("description", "Configure Me");
        Network = ConfValue("server")->getString("network", "Network");
-       AdminName = ConfValue("admin")->getString("name", "");
-       AdminEmail = ConfValue("admin")->getString("email", "null@example.com");
-       AdminNick = ConfValue("admin")->getString("nick", "admin");
        NetBufferSize = ConfValue("performance")->getInt("netbuffersize", 10240, 1024, 65534);
        dns_timeout = ConfValue("dns")->getInt("timeout", 5);
        DisabledCommands = ConfValue("disabled")->getString("commands", "");
@@ -410,6 +399,7 @@ void ServerConfig::Fill()
        Limits.ChanMax = ConfValue("limits")->getInt("maxchan", 64);
        Limits.MaxModes = ConfValue("limits")->getInt("maxmodes", 20);
        Limits.IdentMax = ConfValue("limits")->getInt("maxident", 11);
+       Limits.MaxHost = ConfValue("limits")->getInt("maxhost", 64);
        Limits.MaxQuit = ConfValue("limits")->getInt("maxquit", 255);
        Limits.MaxTopic = ConfValue("limits")->getInt("maxtopic", 307);
        Limits.MaxKick = ConfValue("limits")->getInt("maxkick", 255);
@@ -442,20 +432,7 @@ void ServerConfig::Fill()
                if (socktest < 0)
                        WildcardIPv6 = false;
                else
-                       ServerInstance->SE->Close(socktest);
-       }
-       ConfigTagList tags = ConfTags("uline");
-       for(ConfigIter i = tags.first; i != tags.second; ++i)
-       {
-               ConfigTag* tag = i->second;
-               std::string server;
-               if (!tag->readString("server", server))
-                       throw CoreException("<uline> tag missing server at " + tag->getTagLocation());
-
-               if (ServerName == server)
-                       throw CoreException("Servers should not uline themselves (at " + tag->getTagLocation() + ")");
-
-               ulines[assign(server)] = tag->getBool("silent");
+                       SocketEngine::Close(socktest);
        }
 
        ReadXLine(this, "badip", "ipmask", ServerInstance->XLines->GetFactory("Z"));
@@ -641,10 +618,6 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
                ConfigFileCache::iterator file = this->Files.find(tag->getString("motd", "motd"));
                if (file != this->Files.end())
                      InspIRCd::ProcessColors(file->second);
-
-               file = this->Files.find(tag->getString("rules", "rules"));
-               if (file != this->Files.end())
-                     InspIRCd::ProcessColors(file->second);
        }
 
        /* No old configuration -> initial boot, nothing more to do here */
@@ -693,7 +666,7 @@ void ServerConfig::ApplyModules(User* user)
        for (ModuleManager::ModuleMap::iterator i = removed_modules.begin(); i != removed_modules.end(); ++i)
        {
                const std::string& modname = i->first;
-               // Don't remove cmd_*.so, just remove m_*.so
+               // Don't remove core_*.so, just remove m_*.so
                if (modname.c_str()[0] == 'c')
                        continue;
                if (ServerInstance->Modules->Unload(i->second))