mirror of
https://github.com/znc/znc.git
synced 2026-07-04 17:01:23 +02:00
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:
+4
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user