]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Undocument <power> and set the default to the server name.
authorPeter Powell <petpow@saberuk.com>
Sun, 11 Sep 2016 00:15:44 +0000 (01:15 +0100)
committerPeter Powell <petpow@saberuk.com>
Mon, 12 Sep 2016 14:41:39 +0000 (15:41 +0100)
docs/conf/helpop-full.conf.example
docs/conf/inspircd.conf.example
src/coremods/core_oper/cmd_die.cpp
src/coremods/core_oper/cmd_restart.cpp
src/coremods/core_oper/core_oper.cpp

index b9a3392e6dff04d8b1b727ff9416a3cc793d13a0..d8af395addbcace772ba043abee145d7c7afa22f 100644 (file)
@@ -621,17 +621,15 @@ The duration may be specified in seconds, or in the format
 1y2w3d4h5m6s - meaning one year, two weeks, three days, 4 hours,
 5 minutes and 6 seconds. All fields in this format are optional.">
 
-<helpop key="die" value="/DIE <password>
+<helpop key="die" value="/DIE <server>
 
 This command shuts down the local server. A single parameter is
-required, which must match the password in the configuration for the
-command to function.">
+required, which must match the name of the local server.">
 
-<helpop key="restart" value="/RESTART <password>
+<helpop key="restart" value="/RESTART <server>
 
 This command restarts the local server. A single parameter is
-required, which must match the password in the configuration for the
-command to function.">
+required, which must match the name of the local server.">
 
 <helpop key="commands" value="/COMMANDS
 
index d56ac55ac22075359a44b4d55671f0610606a613..30fe67bee1956d78be4c194a5d84d4128a22dba1 100644 (file)
 <bind address="1.2.3.4" port="7005" type="servers" ssl="openssl">
 
 
-#-#-#-#-#-#-#-#-#-#-  DIE/RESTART CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-
-#                                                                     #
-#   You can configure the passwords here which you wish to use for    #
-#   the /DIE and /RESTART commands. Only trusted ircops who will      #
-#   need this ability should know the die and restart password.       #
-#                                                                     #
-
-<power
-       # hash: what hash these passwords are hashed with.
-       # Requires the module for selected hash (md5, sha256, or
-       # ripemd160) be loaded and the password hashing module
-       # (password_hash) loaded.
-       # Options here are: "md5", "sha256" and "ripemd160", or one of
-       # these prefixed with "hmac-", e.g.: "hmac-sha256".
-       # Optional, but recommended. Create hashed passwords with:
-       # /mkpasswd <hash> <password>
-       #hash="sha256"
-
-       # diepass: Password for opers to use if they need to shutdown (die)
-       # a server.
-       diepass=""
-
-       # restartpass: Password for opers to use if they need to restart
-       # a server.
-       restartpass="">
-
-
 #-#-#-#-#-#-#-#-#-#-  CONNECTIONS CONFIGURATION  -#-#-#-#-#-#-#-#-#-#-#
 #                                                                     #
 #   This is where you can configure which connections are allowed     #
index 4bc6c25dba81221ca87bcbaac29f5baad8caa5f1..ff9318de1e7681ac49e950d4042006f3a4281178 100644 (file)
@@ -26,7 +26,7 @@ CommandDie::CommandDie(Module* parent)
        : Command(parent, "DIE", 1)
 {
        flags_needed = 'o';
-       syntax = "<password>";
+       syntax = "<server>";
 }
 
 static void QuitAll()
index 3e219727f9762070a8b41602c46e80610576957a..83670862657c410516c97b51f7a5864fde7e713a 100644 (file)
@@ -25,7 +25,7 @@ CommandRestart::CommandRestart(Module* parent)
        : Command(parent, "RESTART", 1, 1)
 {
        flags_needed = 'o';
-       syntax = "<password>";
+       syntax = "<server>";
 }
 
 CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, User *user)
index 0fc82df8f09bf0fe2925471121452f55ac23e39e..a6b2abd81194a8f6722481aca6b3c5bc0d166b9f 100644 (file)
@@ -27,7 +27,7 @@ namespace DieRestart
                ConfigTag* tag = ServerInstance->Config->ConfValue("power");
                // The hash method for *BOTH* the die and restart passwords
                const std::string hash = tag->getString("hash");
-               const std::string correctpass = tag->getString(confentry);
+               const std::string correctpass = tag->getString(confentry,  ServerInstance->Config->ServerName);
                return ServerInstance->PassCompare(user, correctpass, inputpass, hash);
        }
 }