From c8d8978cd0bfb10613da331c5b13bbcf8486f85f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 12 Mar 2024 21:57:38 +0000 Subject: Require that at least one encryption module is loaded. --- src/init.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index c6cb62428..8b9703493 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -519,8 +519,12 @@ bool Anope::Init(int ac, char **av) setuidgid(); #endif - Module *protocol = ModuleManager::FindFirstOf(PROTOCOL); - if (protocol == NULL) + auto *encryption = ModuleManager::FindFirstOf(ENCRYPTION); + if (!encryption) + throw CoreException("You must load an encryption module!"); + + auto *protocol = ModuleManager::FindFirstOf(PROTOCOL); + if (!protocol) throw CoreException("You must load a protocol module!"); /* Write our PID to the PID file. */ -- cgit