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);