]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_oper/core_oper.cpp
spanningtree: use bindip aftype as a hint for dns lookup type
[user/henk/code/inspircd.git] / src / coremods / core_oper / core_oper.cpp
index f94681138426856f14e853b2447ef0c104ca196a..0fc82df8f09bf0fe2925471121452f55ac23e39e 100644 (file)
 #include "inspircd.h"
 #include "core_oper.h"
 
+namespace DieRestart
+{
+       bool CheckPass(User* user, const std::string& inputpass, const char* confentry)
+       {
+               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);
+               return ServerInstance->PassCompare(user, correctpass, inputpass, hash);
+       }
+}
+
 class CoreModOper : public Module
 {
        CommandDie cmddie;