mirror of
https://github.com/znc/znc.git
synced 2026-07-06 01:41:12 +02:00
Add CModules::GetModPathInfo()
This function works like GetModInfo(), but takes the full path to the module, too. This is used to speed up GetAvailableMods(). Before it created a list of module paths, extracted the names and then called GetModInfo() on those module names which looked up the path for the modules again. This extra step is now skipped and the module's path is used directly. To make this work, the call to FindModPath() was moved from OpenModule() into its two callers LoadModule() and GetModInfo(). git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1613 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -462,6 +462,7 @@ public:
|
||||
bool ReloadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg);
|
||||
|
||||
bool GetModInfo(CModInfo& ModInfo, const CString& sModule, CString &sRetMsg);
|
||||
bool GetModPathInfo(CModInfo& ModInfo, const CString& sModule, const CString& sModPath, CString &sRetMsg);
|
||||
void GetAvailableMods(set<CModInfo>& ssMods, bool bGlobal = false);
|
||||
|
||||
// This returns the path to the .so and to the data dir
|
||||
@@ -474,7 +475,7 @@ public:
|
||||
static ModDirList GetModDirs();
|
||||
|
||||
private:
|
||||
ModHandle OpenModule(const CString& sModule, CString& sModPath, CString& sDataPath,
|
||||
ModHandle OpenModule(const CString& sModule, const CString& sModPath,
|
||||
bool &bVersionMismatch, bool &bIsGlobal, CString& sDesc, CString& sRetMsg);
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user