Check that modules are in place on start.

There're many people who forget to run "make install" and then wonder
why they can't load any module.

This should fix it, hopefully.
This commit is contained in:
Alexey Sokolov
2012-02-05 17:41:40 +07:00
parent be81853b24
commit 94f785948b
+11 -5
View File
@@ -204,12 +204,18 @@ int main(int argc, char** argv) {
return 0;
}
#ifndef RUN_FROM_SOURCE
if (CFile::Exists(pZNC->GetCurPath() + "/znc-uninstalled.pc")) {
CUtils::PrintError("It looks like you are running ZNC without installing it first.");
CUtils::PrintError("Recompile with --enable-run-from-source if you intend to do that.");
{
set<CModInfo> ssGlobalMods;
pZNC->GetModules().GetAvailableMods(ssGlobalMods, CModInfo::GlobalModule);
if (ssGlobalMods.empty()) {
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;
}
}
}
#endif
if (isRoot()) {
CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");