mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Allow making the MKPASSWD command only usable by opers.
This commit is contained in:
parent
9f3b933371
commit
5c8b212a3c
@ -1748,6 +1748,9 @@
|
||||
#
|
||||
# Generate hashes using the /MKPASSWD command on the server.
|
||||
# Don't run it on a server you don't trust with your password.
|
||||
#
|
||||
# You can also make the MKPASSWD command oper only by uncommenting this:
|
||||
#<mkpasswd operonly="yes">
|
||||
|
||||
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
|
||||
# PBKDF2 module: Allows other modules to generate PBKDF2 hashes,
|
||||
|
@ -88,6 +88,12 @@ class ModulePasswordHash : public Module
|
||||
{
|
||||
}
|
||||
|
||||
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
|
||||
{
|
||||
ConfigTag* tag = ServerInstance->Config->ConfValue("mkpasswd");
|
||||
cmd.flags_needed = tag->getBool("operonly") ? 'o' : 0;
|
||||
}
|
||||
|
||||
ModResult OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype) CXX11_OVERRIDE
|
||||
{
|
||||
if (!hashtype.compare(0, 5, "hmac-", 5))
|
||||
|
Loading…
x
Reference in New Issue
Block a user