Permalink
Browse files

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
  • Loading branch information...
1 parent cab1405 commit fa0132900eea90ae20b6d9a6cd4f0c71d4d0c4ae @DarthGandalf DarthGandalf committed May 27, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main.cpp
View
@@ -207,15 +207,18 @@ int main(int argc, char** argv) {
{
set<CModInfo> 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)) {
delete pZNC;
return 1;
}
}
+ CUtils::PrintStatus(true, "");
}
if (isRoot()) {

0 comments on commit fa01329

Please sign in to comment.