mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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
This commit is contained in:
@@ -207,8 +207,10 @@ 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)) {
|
||||
@@ -216,6 +218,7 @@ int main(int argc, char** argv) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
CUtils::PrintStatus(true, "");
|
||||
}
|
||||
|
||||
if (isRoot()) {
|
||||
|
||||
Reference in New Issue
Block a user