From ff448ba9e60a967c9104d3189eafce897ed74645 Mon Sep 17 00:00:00 2001 From: prozacx Date: Mon, 16 May 2005 06:57:58 +0000 Subject: [PATCH] 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 --- User.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/User.cpp b/User.cpp index 76e4830a..1cddc317 100644 --- a/User.cpp +++ b/User.cpp @@ -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);