Check if the version of a module matches when querying info about it

When the module was compiled for a wrong ZNC version it's description will
say so. Everything which displays a list of available modules together with
their description will display this (--makeconf, /msg *status listavailmods,
webadmin).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1420 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-03-10 19:15:08 +00:00
parent c30b9a240f
commit bcf072e3cc

View File

@@ -953,6 +953,11 @@ bool CModules::GetModInfo(CModInfo& ModInfo, const CString& sModule) {
ModInfo.SetDescription(GetDescription());
ModInfo.SetName(sModule);
ModInfo.SetPath(sModPath);
if (CModule::GetCoreVersion() != Version()) {
ModInfo.SetDescription("--- Version mismatch, recompile this module. ---");
}
dlclose(p);
return true;