From bcf072e3ccbfa3b379e0f138eba549870b494180 Mon Sep 17 00:00:00 2001 From: psychon Date: Tue, 10 Mar 2009 19:15:08 +0000 Subject: [PATCH] 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 --- Modules.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules.cpp b/Modules.cpp index 71b3e377..9e295dd5 100644 --- a/Modules.cpp +++ b/Modules.cpp @@ -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;