diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-11-11 00:26:05 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-11-11 00:26:05 +0000 |
commit | a95d82e5241204b90ad96bcc56f56522668dcc9e (patch) | |
tree | 0295c9c6b769fdc9a281b58dea7839497ec000d6 | |
parent | 19487dbebc520450e457472b97d9e7bcd5160c00 (diff) |
Get rid of DieDelay, it just freezes the ircd prior to exit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12084 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/configreader.h | 5 | ||||
-rw-r--r-- | src/commands/cmd_die.cpp | 15 | ||||
-rw-r--r-- | src/configreader.cpp | 3 |
3 files changed, 2 insertions, 21 deletions
diff --git a/include/configreader.h b/include/configreader.h index f5ce4b57a..e9bcbdb2c 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -414,11 +414,6 @@ class CoreExport ServerConfig */ int MaxWhoResults; - /** How many seconds to wait before exiting - * the program when /DIE is correctly issued. - */ - int DieDelay; - /** True if we're going to hide netsplits as *.net *.split for non-opers */ bool HideSplits; diff --git a/src/commands/cmd_die.cpp b/src/commands/cmd_die.cpp index 658240de8..9cc0654a1 100644 --- a/src/commands/cmd_die.cpp +++ b/src/commands/cmd_die.cpp @@ -13,14 +13,6 @@ #include "inspircd.h" -#ifndef __CMD_DIE_H__ -#define __CMD_DIE_H__ - -// include the common header files - -#include "users.h" -#include "channels.h" - /** Handle /DIE. These command handlers can be reloaded by the core, * and handle basic RFC1459 commands. Commands within modules work * the same way, however, they can be fully unloaded, where these @@ -41,8 +33,6 @@ class CommandDie : public Command CmdResult Handle(const std::vector<std::string>& parameters, User *user); }; -#endif - #include "exitcodes.h" /** Handle /DIE @@ -52,14 +42,11 @@ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User * if (!ServerInstance->PassCompare(user, ServerInstance->Config->diepass, parameters[0].c_str(), ServerInstance->Config->powerhash)) { { - std::string diebuf = std::string("*** DIE command from ") + user->nick + "!" + user->ident + "@" + user->dhost + ". Terminating in " + ConvToStr(ServerInstance->Config->DieDelay) + " seconds."; + std::string diebuf = std::string("*** DIE command from ") + user->nick + "!" + user->ident + "@" + user->dhost + ". Terminating."; ServerInstance->Logs->Log("COMMAND",SPARSE, diebuf); ServerInstance->SendError(diebuf); } - if (ServerInstance->Config->DieDelay) - sleep(ServerInstance->Config->DieDelay); - ServerInstance->Exit(EXIT_STATUS_DIE); } else diff --git a/src/configreader.cpp b/src/configreader.cpp index 335b2458d..f81283dc7 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -37,7 +37,7 @@ ServerConfig::ServerConfig() WhoWasGroupSize = WhoWasMaxGroups = WhoWasMaxKeep = 0; NoUserDns = OperSpyWhois = HideBans = HideSplits = UndernetMsgPrefix = false; CycleHosts = InvBypassModes = true; - dns_timeout = DieDelay = 5; + dns_timeout = 5; MaxTargets = 20; NetBufferSize = 10240; SoftLimit = ServerInstance->SE->GetMaxFds(); @@ -431,7 +431,6 @@ void ServerConfig::Fill() diepass = ConfValue("power")->getString("diepass"); restartpass = ConfValue("power")->getString("restartpass"); powerhash = ConfValue("power")->getString("hash"); - DieDelay = ConfValue("power")->getInt("pause"); PrefixQuit = options->getString("prefixquit"); SuffixQuit = options->getString("suffixquit"); FixedQuit = options->getString("fixedquit"); |