]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Change 2.0 cloak function to use variable-length segments
[user/henk/code/inspircd.git] / src / configreader.cpp
index eb6dc55484e1646ab6b108e9a28315a9bef0897c..c0e9b5992dabf50b1f0d32859b9520ff132f0651 100644 (file)
@@ -21,7 +21,7 @@
 ServerConfig::ServerConfig()
 {
        WhoWasGroupSize = WhoWasMaxGroups = WhoWasMaxKeep = 0;
-       NoUserDns = OperSpyWhois = HideBans = HideSplits = UndernetMsgPrefix = false;
+       RawLog = NoUserDns = HideBans = HideSplits = UndernetMsgPrefix = false;
        WildcardIPv6 = CycleHosts = InvBypassModes = true;
        dns_timeout = 5;
        MaxTargets = 20;
@@ -476,7 +476,6 @@ void ServerConfig::Fill()
        HideBans = security->getBool("hidebans");
        HideWhoisServer = security->getString("hidewhois");
        HideKillsServer = security->getString("hidekills");
-       OperSpyWhois = security->getBool("operspywhois");
        RestrictBannedUsers = security->getBool("restrictbannedusers", true);
        GenericOper = security->getBool("genericoper");
        NoUserDns = ConfValue("performance")->getBool("nouserdns");
@@ -588,6 +587,14 @@ void ServerConfig::Fill()
        else
                AnnounceInvites = ServerConfig::INVITE_ANNOUNCE_NONE;
 
+       v = security->getString("operspywhois");
+       if (v == "splitmsg")
+               OperSpyWhois = SPYWHOIS_SPLITMSG;
+       else if (v == "on" || v == "yes")
+               OperSpyWhois = SPYWHOIS_NEWLINE;
+       else
+               OperSpyWhois = SPYWHOIS_NONE;
+
        Limits.Finalise();
 }
 
@@ -859,9 +866,7 @@ void ConfigReaderThread::Finish()
 {
        ServerConfig* old = ServerInstance->Config;
        ServerInstance->Logs->Log("CONFIG",DEBUG,"Switching to new configuration...");
-       ServerInstance->Logs->CloseLogs();
        ServerInstance->Config = this->Config;
-       ServerInstance->Logs->OpenFileLogs();
        Config->Apply(old, TheUserUID);
 
        if (Config->valid)
@@ -882,13 +887,17 @@ void ConfigReaderThread::Finish()
                FOREACH_MOD(I_OnRehash, OnRehash(user));
                ServerInstance->BuildISupport();
 
+               ServerInstance->Logs->CloseLogs();
+               ServerInstance->Logs->OpenFileLogs();
+
+               if (Config->RawLog && !old->RawLog)
+                       ServerInstance->Users->ServerNoticeAll("*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded.");
+
                Config = old;
        }
        else
        {
                // whoops, abort!
-               ServerInstance->Logs->CloseLogs();
                ServerInstance->Config = old;
-               ServerInstance->Logs->OpenFileLogs();
        }
 }