mirror of
https://github.com/znc/znc.git
synced 2026-08-08 01:43:03 +02:00
Teach CUser::Clone() to also handle channel settings
Now rehashing can finally change channel settings, too. One part of this patch worries me: Detaching / Attaching channels via rehash. Let's see what happens... git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1058 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -387,9 +387,12 @@ bool CUser::Clone(const CUser& User, CString& sErrorRet) {
|
||||
|
||||
for (a = 0; a < m_vChans.size(); a++) {
|
||||
CChan* pChan = m_vChans[a];
|
||||
CChan* pNewChan = User.FindChan(pChan->GetName());
|
||||
|
||||
if (!User.FindChan(pChan->GetName())) {
|
||||
if (!pNewChan) {
|
||||
pChan->SetInConfig(false);
|
||||
} else {
|
||||
pChan->Clone(*pNewChan);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user