Fix webadmin when editing a user

Since this creates a new user, and then clones it. It would clear all
the networks. To fix this, I have made an option bCloneNetworks to
CUser::Clone. This replaces the bCloneChans because this is unnessecery
now.

Fixes #88
This commit is contained in:
Kyle Fuller
2011-11-13 00:18:43 +00:00
parent 2ffcbed5bb
commit 01b15bfb5b
4 changed files with 40 additions and 40 deletions
+4 -5
View File
@@ -54,7 +54,7 @@ CIRCNetwork::CIRCNetwork(CUser *pUser, const CString& sName) {
m_QueryBuffer.SetLineCount(250, true);
}
CIRCNetwork::CIRCNetwork(CUser *pUser, const CIRCNetwork &Network, bool bCloneChans) {
CIRCNetwork::CIRCNetwork(CUser *pUser, const CIRCNetwork &Network) {
m_pUser = NULL;
SetUser(pUser);
@@ -70,10 +70,10 @@ CIRCNetwork::CIRCNetwork(CUser *pUser, const CIRCNetwork &Network, bool bCloneCh
m_MotdBuffer.SetLineCount(200, true); // This should be more than enough motd lines
m_QueryBuffer.SetLineCount(250, true);
Clone(Network, bCloneChans);
Clone(Network);
}
void CIRCNetwork::Clone(const CIRCNetwork& Network, bool bCloneChans) {
void CIRCNetwork::Clone(const CIRCNetwork& Network) {
m_sName = Network.GetName();
SetNick(Network.GetNick());
@@ -136,8 +136,7 @@ void CIRCNetwork::Clone(const CIRCNetwork& Network, bool bCloneChans) {
if (!pNewChan) {
pChan->SetInConfig(false);
} else {
if (bCloneChans)
pChan->Clone(*pNewChan);
pChan->Clone(*pNewChan);
}
}
// !Chans