From 82907aa0f2f21bb7fd17edd71c31f665ab360ebd Mon Sep 17 00:00:00 2001 From: prozacx Date: Tue, 20 Sep 2005 01:56:32 +0000 Subject: [PATCH] Got rid of CUser::FindModPath() git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@513 726aef4b-f618-498e-8847-2d620e286838 --- Modules.cpp | 10 +++------- Modules.h | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Modules.cpp b/Modules.cpp index 2a0242ff..a507e1f4 100644 --- a/Modules.cpp +++ b/Modules.cpp @@ -685,7 +685,7 @@ bool CModules::LoadModule(const CString& sModule, const CString& sArgs, CUser* p return false; } - CString sModPath = FindModPath(sModule, pUser); + CString sModPath = FindModPath(sModule); if (sModPath.empty()) { sRetMsg = "Unable to find module [" + sModule + "]"; @@ -858,11 +858,7 @@ bool CModules::ReloadModule(const CString& sModule, const CString& sArgs, CUser* return true; } -CString CModules::FindModPath(const CString& sModule, CUser* pUser) { - if (pUser) { - return pUser->FindModPath(sModule); - } - +CString CModules::FindModPath(const CString& sModule) { return CZNC::Get().FindModPath(sModule); } @@ -875,7 +871,7 @@ bool CModules::GetModInfo(CModInfo& ModInfo, const CString& sModule) { } } - CString sModPath = FindModPath(sModule, NULL); + CString sModPath = FindModPath(sModule); if (sModPath.empty()) { return false; diff --git a/Modules.h b/Modules.h index 43b22e19..f1b20748 100644 --- a/Modules.h +++ b/Modules.h @@ -359,7 +359,7 @@ public: bool UnloadModule(const CString& sModule); bool UnloadModule(const CString& sModule, CString& sRetMsg); bool ReloadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg); - CString FindModPath(const CString& sModule, CUser* pUser = NULL); + CString FindModPath(const CString& sModule); bool GetModInfo(CModInfo& ModInfo, const CString& sModule); void GetAvailableMods(set& ssMods, bool bGlobal = false);