diff --git a/User.cpp b/User.cpp index 32be4c48..92b46f21 100644 --- a/User.cpp +++ b/User.cpp @@ -251,7 +251,7 @@ void CUser::UserDisconnected(CClient* pClient) { } } -bool CUser::Clone(const CUser& User, CString& sErrorRet) { +bool CUser::Clone(const CUser& User, CString& sErrorRet, bool bCloneChans) { unsigned int a = 0; sErrorRet.clear(); @@ -392,7 +392,8 @@ bool CUser::Clone(const CUser& User, CString& sErrorRet) { if (!pNewChan) { pChan->SetInConfig(false); } else { - pChan->Clone(*pNewChan); + if (bCloneChans) + pChan->Clone(*pNewChan); } } diff --git a/User.h b/User.h index 3dbad504..02dca00a 100644 --- a/User.h +++ b/User.h @@ -106,7 +106,7 @@ public: bool GetFile(const CString& sRemoteNick, const CString& sRemoteIP, unsigned short uRemotePort, const CString& sFileName, unsigned long uFileSize, const CString& sModuleName = ""); bool ResumeFile(const CString& sRemoteNick, unsigned short uPort, unsigned long uFileSize); CString GetCurNick() const; - bool Clone(const CUser& User, CString& sErrorRet); + bool Clone(const CUser& User, CString& sErrorRet, bool bCloneChans = true); void BounceAllClients(); void AddBytesRead(unsigned long long u) { m_uBytesRead += u; } diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index 98cf55a2..2ce75267 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -993,7 +993,7 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) { } } else { // Edit User Submission - if (!pUser->Clone(*pNewUser, sErr)) { + if (!pUser->Clone(*pNewUser, sErr, false)) { delete pNewUser; GetErrorPage(sPageRet, "Invalid Submission [" + sErr + "]"); return true;