This covers the code changes for the datadir move (which is now finished)

Based on darix' patch I wrote this. Modperl's changes were not tested since I
didn't find someone who could test it. Well...

Ah and btw it regenerates configure


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@902 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-12-12 21:15:44 +00:00
parent 608fbdbdb0
commit 1360effd31
8 changed files with 105 additions and 72 deletions
+17 -12
View File
@@ -1261,28 +1261,33 @@ void CZNC::Broadcast(const CString& sMessage, CUser* pUser) {
}
}
CString CZNC::FindModPath(const CString& sModule) const {
CString sModPath = GetCurPath() + "/modules/" + sModule;
sModPath += (sModule.find(".") == CString::npos) ? ".so" : "";
bool CZNC::FindModPath(const CString& sModule, CString& sModPath,
CString& sDataPath) const {
CString sMod = sModule;
CString sDir = sMod;
if (sModule.find(".") == CString::npos)
sMod += ".so";
sDataPath = GetCurPath() + "/modules/";
sModPath = sDataPath + sMod;
if (!CFile::Exists(sModPath)) {
//DEBUG_ONLY(cout << "[" << sModPath << "] Not found..." << endl);
sModPath = GetModPath() + "/" + sModule;
sModPath += (sModule.find(".") == CString::npos) ? ".so" : "";
sDataPath = GetModPath() + "/";
sModPath = sDataPath + sMod;
if (!CFile::Exists(sModPath)) {
//DEBUG_ONLY(cout << "[" << sModPath << "] Not found..." << endl);
sModPath = _MODDIR_ + CString("/") + sModule;
sModPath += (sModule.find(".") == CString::npos) ? ".so" : "";
sDataPath = _DATADIR_ + CString("/");
sModPath = _MODDIR_ + CString("/") + sMod;
if (!CFile::Exists(sModPath)) {
//DEBUG_ONLY(cout << "[" << sModPath << "] Not found... giving up!" << endl);
return "";
return false;
}
}
}
return sModPath;
sDataPath += sDir;
return true;
}
CUser* CZNC::FindUser(const CString& sUsername) {