summaryrefslogtreecommitdiff
path: root/src/misc.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-03-11 19:37:11 +0000
committerSadie Powell <sadie@witchery.services>2024-03-11 19:39:47 +0000
commit02355546ff4a76a10049f9c7f03d0b778b247dba (patch)
tree072b150c8f46b0038f1d21b423ca57319cbde338 /src/misc.cpp
parent6ad3430ac41fdd3669d1f4d23e8a0a3adba22c2b (diff)
Reject registrations and password changes if password encryption fails.
Diffstat (limited to 'src/misc.cpp')
-rw-r--r--src/misc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index a64de450e..d2c05da12 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -494,11 +494,11 @@ bool Anope::Match(const Anope::string &str, const Anope::string &mask, bool case
return m == mask_len;
}
-void Anope::Encrypt(const Anope::string &src, Anope::string &dest)
+bool Anope::Encrypt(const Anope::string &src, Anope::string &dest)
{
EventReturn MOD_RESULT;
FOREACH_RESULT(OnEncrypt, MOD_RESULT, (src, dest));
- static_cast<void>(MOD_RESULT);
+ return MOD_RESULT == EVENT_ALLOW &&!dest.empty();
}
Anope::string Anope::printf(const char *fmt, ...)