Added argument support for modules in Clone()

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@487 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-09-13 06:13:03 +00:00
parent 44be92a5ee
commit e3de30f19d
+6 -2
View File
@@ -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 (...) {}
}
}