Changed FindModPath() to only append .so if there is no dot in the mod name

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@323 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-05-16 06:57:58 +00:00
parent 1f16b12c35
commit ff448ba9e6
+6 -3
View File
@@ -474,15 +474,18 @@ const CString& CUser::GetVHost() const { return m_sVHost; }
const CString& CUser::GetPass() const { return m_sPass; }
CString CUser::FindModPath(const CString& sModule) const {
CString sModPath = GetCurPath() + "/modules/" + sModule + ".so";
CString sModPath = GetCurPath() + "/modules/" + sModule;
sModPath += (sModule.find(".") == CString::npos) ? ".so" : "";
if (!CFile::Exists(sModPath)) {
DEBUG_ONLY(cout << "[" << sModPath << "] Not found..." << endl);
sModPath = GetModPath() + "/" + sModule + ".so";
sModPath = GetModPath() + "/" + sModule;
sModPath += (sModule.find(".") == CString::npos) ? ".so" : "";
if (!CFile::Exists(sModPath)) {
DEBUG_ONLY(cout << "[" << sModPath << "] Not found..." << endl);
sModPath = _MODDIR_ + CString("/") + sModule + ".so";
sModPath = _MODDIR_ + CString("/") + sModule;
sModPath += (sModule.find(".") == CString::npos) ? ".so" : "";
if (!CFile::Exists(sModPath)) {
DEBUG_ONLY(cout << "[" << sModPath << "] Not found... giving up!" << endl);