]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Seperate ModeReference into ChanModeReference and UserModeReference
[user/henk/code/inspircd.git] / src / configreader.cpp
index 905eb786af84b0646b6ae4eca423e172cb903935..b8c54bef9a5ba5ae41696bafcdf3da71b94ea827 100644 (file)
@@ -372,10 +372,6 @@ void ServerConfig::Fill()
                std::string nsid = ConfValue("server")->getString("id");
                if (!nsid.empty() && nsid != sid)
                        throw CoreException("You must restart to change the server id");
-
-               if (Limits.MaxLine != static_cast<size_t>(ConfValue("limits")->getInt("maxline", 512)))
-                       throw CoreException("You must restart to change the maximum line length");
-
        }
        diepass = ConfValue("power")->getString("diepass");
        restartpass = ConfValue("power")->getString("restartpass");
@@ -387,6 +383,7 @@ void ServerConfig::Fill()
        SuffixPart = options->getString("suffixpart");
        FixedPart = options->getString("fixedpart");
        SoftLimit = ConfValue("performance")->getInt("softlimit", ServerInstance->SE->GetMaxFds());
+       CCOnConnect = ConfValue("performance")->getBool("clonesonconnect", true);
        MaxConn = ConfValue("performance")->getInt("somaxconn", SOMAXCONN);
        MoronBanner = options->getString("moronbanner", "You're banned!");
        ServerDesc = ConfValue("server")->getString("description", "Configure Me");
@@ -432,9 +429,10 @@ void ServerConfig::Fill()
        InvBypassModes = options->getBool("invitebypassmodes", true);
        NoSnoticeStack = options->getBool("nosnoticestack", false);
 
+       if (Network.find(' ') != std::string::npos)
+               throw CoreException(Network + " is not a valid network name. A network name must not contain spaces.");
+
        range(SoftLimit, 10, ServerInstance->SE->GetMaxFds(), ServerInstance->SE->GetMaxFds(), "<performance:softlimit>");
-       if (ConfValue("performance")->getBool("limitsomaxconn", true))
-               range(MaxConn, 0, SOMAXCONN, SOMAXCONN, "<performance:somaxconn>");
        range(MaxTargets, 1, 31, 20, "<security:maxtargets>");
        range(NetBufferSize, 1024, 65534, 10240, "<performance:netbuffersize>");
 
@@ -694,9 +692,6 @@ void ServerConfig::ApplyModules(User* user)
                }
        }
 
-       if (ConfValue("options")->getBool("allowhalfop") && removed_modules.erase("m_halfop.so") == 0)
-               added_modules.push_back("m_halfop.so");
-
        for (std::set<std::string>::iterator removing = removed_modules.begin(); removing != removed_modules.end(); removing++)
        {
                // Don't remove cmd_*.so, just remove m_*.so
@@ -830,7 +825,7 @@ void ConfigReaderThread::Finish()
                 */
                ServerInstance->XLines->CheckELines();
                ServerInstance->XLines->ApplyLines();
-               ModeReference ban(NULL, "ban");
+               ChanModeReference ban(NULL, "ban");
                static_cast<ListModeBase*>(*ban)->DoRehash();
                Config->ApplyDisabledCommands(Config->DisabledCommands);
                User* user = ServerInstance->FindNick(TheUserUID);