mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
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:
@@ -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 (...) {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user