mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add CModules::GetModDirs()
This function returns a list of <module dir, data dir> pairs which lists all places in which modules should be looked for. FindModPath() and GetAvailableMods() are changed to use this new function. The list of places to look at is the same that was used before, but this now also adds ./modules/extra so that modules enabled via --enable-extra are found before 'make install'. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1612 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "Utils.h"
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <stack>
|
||||
|
||||
using std::vector;
|
||||
using std::set;
|
||||
@@ -467,6 +468,10 @@ public:
|
||||
// which is where static data (webadmin skins) are saved
|
||||
static bool FindModPath(const CString& sModule, CString& sModPath,
|
||||
CString& sDataPath);
|
||||
// Return a list of <module dir, data dir> pairs for directories in
|
||||
// which modules can be found.
|
||||
typedef std::stack<std::pair<CString, CString> > ModDirList;
|
||||
static ModDirList GetModDirs();
|
||||
|
||||
private:
|
||||
ModHandle OpenModule(const CString& sModule, CString& sModPath, CString& sDataPath,
|
||||
|
||||
Reference in New Issue
Block a user