summaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-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. */