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:
psychon
2008-05-21 14:22:20 +00:00
parent 2f1b5347c9
commit 3ee049bc5a
3 changed files with 27 additions and 4 deletions
+4 -1
View File
@@ -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);
}
}