From c1bb18b9e80c6f05541811064c95b8c6e2ce7526 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 18 Feb 2011 13:34:47 +0100 Subject: [PATCH] Add CUser::DelCTCPReply() This function is the counterpart for CUser::AddCTCPReply(). Guess what? It removes an entry from CUser::m_mssCTCPReplies again! It's magic! Signed-off-by: Uli Schlachter --- User.cpp | 4 ++++ User.h | 1 + 2 files changed, 5 insertions(+) diff --git a/User.cpp b/User.cpp index 31d2b62a..0ab5ed76 100644 --- a/User.cpp +++ b/User.cpp @@ -1265,6 +1265,10 @@ bool CUser::AddCTCPReply(const CString& sCTCP, const CString& sReply) { return true; } +bool CUser::DelCTCPReply(const CString& sCTCP) { + return m_mssCTCPReplies.erase(sCTCP) > 0; +} + bool CUser::SetStatusPrefix(const CString& s) { if ((!s.empty()) && (s.length() < 6) && (s.find(' ') == CString::npos)) { m_sStatusPrefix = (s.empty()) ? "*" : s; diff --git a/User.h b/User.h index f281d941..fc483d72 100644 --- a/User.h +++ b/User.h @@ -155,6 +155,7 @@ public: void SetIRCServer(const CString& s); void SetQuitMsg(const CString& s); bool AddCTCPReply(const CString& sCTCP, const CString& sReply); + bool DelCTCPReply(const CString& sCTCP); bool SetBufferCount(unsigned int u, bool bForce = false); void SetKeepBuffer(bool b); void SetChanPrefixes(const CString& s) { m_sChanPrefixes = s; }