From 90e9dbca82fe1db77616ba669e2aa96c0b47ca54 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 11 Nov 2016 09:28:49 -0500 Subject: Remove database save and related commands/config --- src/init.cpp | 3 --- src/main.cpp | 21 --------------------- 2 files changed, 24 deletions(-) (limited to 'src') diff --git a/src/init.cpp b/src/init.cpp index 9ee720ebd..0967baa33 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -134,8 +134,6 @@ void Anope::HandleSignal() { case SIGHUP: { - Anope::SaveDatabases(); - try { Configuration::Conf *new_config = new Configuration::Conf(); @@ -160,7 +158,6 @@ void Anope::HandleSignal() Anope::QuitReason = Anope::string("Services terminating via signal ") + stringify(Signal); #endif Anope::Quitting = true; - Anope::SaveDatabases(); break; } diff --git a/src/main.cpp b/src/main.cpp index 33cd9b23f..5a97da7d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,17 +51,6 @@ time_t Anope::CurTime = time(NULL); int Anope::CurrentUplink = -1; -class UpdateTimer : public Timer -{ - public: - UpdateTimer(time_t timeout) : Timer(timeout, Anope::CurTime, true) { } - - void Tick(time_t) override - { - Anope::SaveDatabases(); - } -}; - class ExpireTimer : public Timer { public: @@ -73,15 +62,6 @@ class ExpireTimer : public Timer } }; -void Anope::SaveDatabases() -{ - if (Anope::ReadOnly) - return; - - Log(LOG_DEBUG) << "Saving databases"; - EventManager::Get()->Dispatch(&Event::SaveDatabase::OnSaveDatabase); -} - /** The following comes from InspIRCd to get the full path of the Anope executable */ static Anope::string GetFullProgDir(const Anope::string &argv0) @@ -163,7 +143,6 @@ int main(int ac, char **av, char **envp) /* Set up timers */ time_t last_check = Anope::CurTime; - UpdateTimer updateTimer(Config->GetBlock("options")->Get("updatetimeout", "5m")); ExpireTimer expireTimer(Config->GetBlock("options")->Get("expiretimeout", "30m")); /*** Main loop. ***/ -- cgit