mirror of
https://github.com/znc/znc.git
synced 2026-08-02 23:12:46 +02:00
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:
+11
-5
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user