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:
prozacx
2005-04-03 05:39:08 +00:00
parent a7ae4ad375
commit 933f1cc616
2 changed files with 14 additions and 7 deletions
+5 -3
View File
@@ -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;
+9 -4
View File
@@ -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;