diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-12 21:57:38 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-12 21:57:38 +0000 |
commit | c8d8978cd0bfb10613da331c5b13bbcf8486f85f (patch) | |
tree | 76823207a921c5981a8ddbc1be98f76b48d1ac71 /src | |
parent | 11edba04feea242a320b06cb45fb892fb500bd1e (diff) |
Require that at least one encryption module is loaded.
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 8 |
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. */ |