mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
webadmin: reload global modules whose settings were changed
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1331 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -606,10 +606,15 @@ bool CWebAdminSock::SettingsPage(CString& sPageRet) {
|
||||
if (!sModName.empty()) {
|
||||
CString sArgs = GetParam("modargs_" + sModName);
|
||||
|
||||
if (!CZNC::Get().GetModules().FindModule(sModName)) {
|
||||
CModule *pMod = CZNC::Get().GetModules().FindModule(sModName);
|
||||
if (!pMod) {
|
||||
if (!CZNC::Get().GetModules().LoadModule(sModName, sArgs, NULL, sModRet)) {
|
||||
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] [" << sModRet << "]" << endl);
|
||||
}
|
||||
} else if (pMod->GetArgs() != sArgs) {
|
||||
if (!CZNC::Get().GetModules().ReloadModule(sModName, sArgs, NULL, sModRet)) {
|
||||
DEBUG_ONLY(cerr << "Unable to reload module [" << sModName << "] [" << sModRet << "]" << endl);
|
||||
}
|
||||
} else {
|
||||
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] because it is already loaded" << endl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user