summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-03-12 21:57:38 +0000
committerSadie Powell <sadie@witchery.services>2024-03-12 21:57:38 +0000
commitc8d8978cd0bfb10613da331c5b13bbcf8486f85f (patch)
tree76823207a921c5981a8ddbc1be98f76b48d1ac71
parent11edba04feea242a320b06cb45fb892fb500bd1e (diff)
Require that at least one encryption module is loaded.
-rw-r--r--src/init.cpp8
1 files changed, 6 insertions, 2 deletions
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. */