diff options
| author | Adam <Adam@anope.org> | 2016-11-11 09:28:49 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2016-11-11 09:29:45 -0500 |
| commit | 90e9dbca82fe1db77616ba669e2aa96c0b47ca54 (patch) | |
| tree | 612c0677a9278072ae163c9631187855bd91b1f5 /modules | |
| parent | be17c8118762c7c928239a026359e4fa0fd36f00 (diff) | |
Remove database save and related commands/config
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/operserv/shutdown.cpp | 41 | ||||
| -rw-r--r-- | modules/operserv/update.cpp | 56 |
2 files changed, 7 insertions, 90 deletions
diff --git a/modules/operserv/shutdown.cpp b/modules/operserv/shutdown.cpp index 3b04528d5..030eb73f4 100644 --- a/modules/operserv/shutdown.cpp +++ b/modules/operserv/shutdown.cpp @@ -19,36 +19,12 @@ #include "module.h" -class CommandOSQuit : public Command -{ - public: - CommandOSQuit(Module *creator) : Command(creator, "operserv/quit", 0, 0) - { - this->SetDesc(_("Terminate Services without saving")); - } - - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override - { - Log(LOG_ADMIN, source, this); - Anope::QuitReason = source.command + " command received from " + source.GetNick(); - Anope::Quitting = true; - } - - bool OnHelp(CommandSource &source, const Anope::string &subcommand) override - { - source.Reply(_("Causes Services to do an immediate shutdown; databases may \002not\002 saved." - " If you are using a real time database such as SQL or Redis, this command is not useful." - " This command should not be used unless damage to the in-memory copies of the databases is feared and they should not be saved.")); - return true; - } -}; - class CommandOSRestart : public Command { public: CommandOSRestart(Module *creator) : Command(creator, "operserv/restart", 0, 0) { - this->SetDesc(_("Save databases and restart Services")); + this->SetDesc(_("Restart Anope")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override @@ -56,12 +32,11 @@ class CommandOSRestart : public Command Log(LOG_ADMIN, source, this); Anope::QuitReason = source.command + " command received from " + source.GetNick(); Anope::Quitting = Anope::Restarting = true; - Anope::SaveDatabases(); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { - source.Reply(_("Causes Services to restart.")); + source.Reply(_("Causes Anope to restart.")); return true; } }; @@ -71,7 +46,7 @@ class CommandOSShutdown : public Command public: CommandOSShutdown(Module *creator) : Command(creator, "operserv/shutdown", 0, 0) { - this->SetDesc(_("Terminate services with save")); + this->SetDesc(_("Shutdown Anope")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override @@ -79,27 +54,25 @@ class CommandOSShutdown : public Command Log(LOG_ADMIN, source, this); Anope::QuitReason = source.command + " command received from " + source.GetNick(); Anope::Quitting = true; - Anope::SaveDatabases(); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { - source.Reply(_("Causes Services to shut down")); + source.Reply(_("Causes Anope to shut down")); return true; } }; class OSShutdown : public Module { - CommandOSQuit commandosquit; CommandOSRestart commandosrestart; CommandOSShutdown commandosshutdown; public: - OSShutdown(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), - commandosquit(this), commandosrestart(this), commandosshutdown(this) + OSShutdown(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) + , commandosrestart(this) + , commandosshutdown(this) { - } }; diff --git a/modules/operserv/update.cpp b/modules/operserv/update.cpp deleted file mode 100644 index f12047732..000000000 --- a/modules/operserv/update.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Anope IRC Services - * - * Copyright (C) 2003-2016 Anope Team <team@anope.org> - * - * This file is part of Anope. Anope is free software; you can - * redistribute it and/or modify it under the terms of the GNU - * General Public License as published by the Free Software - * Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see see <http://www.gnu.org/licenses/>. - */ - -#include "module.h" - -class CommandOSUpdate : public Command -{ - public: - CommandOSUpdate(Module *creator) : Command(creator, "operserv/update", 0, 0) - { - this->SetDesc(_("Force the Services databases to be updated immediately")); - } - - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override - { - Log(LOG_ADMIN, source, this); - source.Reply(_("Updating databases.")); - Anope::SaveDatabases(); - } - - bool OnHelp(CommandSource &source, const Anope::string &subcommand) override - { - source.Reply(_("Causes Services to update all database files.")); - return true; - } -}; - -class OSUpdate : public Module -{ - CommandOSUpdate commandosupdate; - - public: - OSUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , commandosupdate(this) - { - - } -}; - -MODULE_INIT(OSUpdate) |
