mirror of
https://github.com/znc/znc.git
synced 2026-07-05 09:21:31 +02:00
Added m_sZNCPath and m_sDataPath
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@69 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -205,9 +205,11 @@ void CZNC::InitDirs(const string& sArgvPath) {
|
||||
m_sHomePath = m_sBinPath;
|
||||
}
|
||||
|
||||
m_sZNCPath = m_sHomePath + "/.znc";
|
||||
|
||||
// Other dirs that we use
|
||||
m_sDLPath = m_sBinPath + "/downloads";
|
||||
m_sModPath = m_sBinPath + "/modules";
|
||||
m_sDLPath = m_sZNCPath + "/downloads";
|
||||
m_sModPath = m_sZNCPath + "/modules";
|
||||
}
|
||||
|
||||
bool CZNC::ParseConfig(const string& sConfigFile) {
|
||||
@@ -416,7 +418,7 @@ bool CZNC::ParseConfig(const string& sConfigFile) {
|
||||
string sModName = CUtils::Token(sValue, 0);
|
||||
string sArgs = CUtils::Token(sValue, 1, true);
|
||||
|
||||
pUser->GetModules().LoadModule(sModName, sArgs, pUser, m_sBinPath, sModRet);
|
||||
pUser->GetModules().LoadModule(sModName, sArgs, pUser, sModRet);
|
||||
cout << sModRet << endl;
|
||||
#else
|
||||
cerr << "Unable to load [" << sValue << "] Modules are not enabled." << endl;
|
||||
|
||||
@@ -28,10 +28,13 @@ public:
|
||||
// Getters
|
||||
TSocketManager<Csock>& GetManager() { return m_Manager; }
|
||||
unsigned int GetListenPort() const { return m_uListenPort; }
|
||||
const string& GetBinPath() const { return m_sBinPath; }
|
||||
const string& GetDLPath() const { return m_sDLPath; }
|
||||
const string& GetModPath() const { return m_sModPath; }
|
||||
const string& GetHomePath() const { return m_sHomePath; }
|
||||
const string& GetBinPath() const { if (!CFile::Exists(m_sBinPath)) { CUtils::MakeDir(m_sBinPath); } return m_sBinPath; }
|
||||
const string& GetDLPath() const { if (!CFile::Exists(m_sDLPath)) { CUtils::MakeDir(m_sDLPath); } return m_sDLPath; }
|
||||
const string& GetModPath() const { if (!CFile::Exists(m_sModPath)) { CUtils::MakeDir(m_sModPath); } return m_sModPath; }
|
||||
const string& GetHomePath() const { if (!CFile::Exists(m_sHomePath)) { CUtils::MakeDir(m_sHomePath); } return m_sHomePath; }
|
||||
const string& GetZNCPath() const { if (!CFile::Exists(m_sZNCPath)) { CUtils::MakeDir(m_sZNCPath); } return m_sZNCPath; }
|
||||
const string& GetDataPath() const { if (!CFile::Exists(m_sDataPath)) { CUtils::MakeDir(m_sDataPath); } return m_sDataPath; }
|
||||
|
||||
bool IsSSL() const {
|
||||
#ifdef HAVE_LIBSSL
|
||||
return m_bSSL;
|
||||
@@ -56,6 +59,8 @@ protected:
|
||||
string m_sDLPath;
|
||||
string m_sModPath;
|
||||
string m_sHomePath;
|
||||
string m_sZNCPath;
|
||||
string m_sDataPath;
|
||||
|
||||
string m_sISpoofFile;
|
||||
string m_sOrigISpoof;
|
||||
|
||||
Reference in New Issue
Block a user