From 130805ae95b741807d3a51d8ea68e363b62fc55e Mon Sep 17 00:00:00 2001 From: cflakes Date: Thu, 14 Jan 2010 11:16:48 +0000 Subject: [PATCH] Added a Clone() method to CNick: void Clone(const CNick& SourceNick); Patch by KiNgMaR, thanks! git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1711 726aef4b-f618-498e-8847-2d620e286838 --- Nick.cpp | 9 +++++++++ Nick.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/Nick.cpp b/Nick.cpp index 347823dd..b84ca118 100644 --- a/Nick.cpp +++ b/Nick.cpp @@ -151,3 +151,12 @@ CString CNick::GetHostMask() const { return (sRet); } + +void CNick::Clone(const CNick& SourceNick) { + SetNick(SourceNick.GetNick()); + SetIdent(SourceNick.GetIdent()); + SetHost(SourceNick.GetHost()); + + m_sChanPerms = SourceNick.m_sChanPerms; + m_pUser = SourceNick.m_pUser; +} diff --git a/Nick.h b/Nick.h index bfdf4414..aa972e52 100644 --- a/Nick.h +++ b/Nick.h @@ -51,6 +51,8 @@ public: const CString& GetHost() const; CString GetNickMask() const; // !Getters + + void Clone(const CNick& SourceNick); private: protected: CString m_sChanPerms;