From fa0132900eea90ae20b6d9a6cd4f0c71d4d0c4ae Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 27 May 2012 12:58:30 +0700 Subject: [PATCH] Tell user what's going on before potential crash. Custom modules compiled for older ZNC can crash ZNC. Because now ZNC checks for list of available modules on startup in order to check whether it's installed or not, it can crash right on startup. Now it outputs nice message about checking for modules before that. See github issue #172 --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index a95623e5..359b34b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -207,8 +207,10 @@ int main(int argc, char** argv) { { set ssGlobalMods; + CUtils::PrintAction("Checking for list of available modules"); pZNC->GetModules().GetAvailableMods(ssGlobalMods, CModInfo::GlobalModule); if (ssGlobalMods.empty()) { + CUtils::PrintStatus(false, ""); CUtils::PrintError("No modules found. Perhaps you didn't install ZNC properly?"); CUtils::PrintError("Read http://wiki.znc.in/Installation for instructions."); if (!CUtils::GetBoolInput("Do you really want to run ZNC without any modules?", false)) { @@ -216,6 +218,7 @@ int main(int argc, char** argv) { return 1; } } + CUtils::PrintStatus(true, ""); } if (isRoot()) {