From e3de30f19d188aef2529e17b1e3b1ca53855fd17 Mon Sep 17 00:00:00 2001 From: prozacx Date: Tue, 13 Sep 2005 06:13:03 +0000 Subject: [PATCH] Added argument support for modules in Clone() git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@487 726aef4b-f618-498e-8847-2d620e286838 --- User.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/User.cpp b/User.cpp index da78aff6..0af27f2f 100644 --- a/User.cpp +++ b/User.cpp @@ -116,13 +116,17 @@ bool CUser::Clone(const CUser& User, CString& sErrorRet) { const CModules& vNewMods = User.GetModules(); for (a = 0; a < vNewMods.size(); a++) { + CString sModRet; CModule* pNewMod = vNewMods[a]; CModule* pCurMod = vCurMods.FindModule(pNewMod->GetModName()); if (!pCurMod) { - CString sModRet; try { - vCurMods.LoadModule(pNewMod->GetModName(), "", this, sModRet); + vCurMods.LoadModule(pNewMod->GetModName(), pNewMod->GetArgs(), this, sModRet); + } catch (...) {} + } else if (pNewMod->GetArgs() != pCurMod->GetArgs()) { + try { + vCurMods.ReloadModule(pNewMod->GetModName(), pNewMod->GetArgs(), this, sModRet); } catch (...) {} } }