From 416cd2cfe899a244ca535cbb826ab2db1dd9a2ba Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 2 Jan 2010 13:02:33 +0000 Subject: [PATCH] Query buffer: Include /me's Before, the query buffer did include regular channel messages, but CTCP ACTIONs were just discarded. This is now fixed. Thanks to jarryd for finding and reporting this. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1687 726aef4b-f618-498e-8847-2d620e286838 --- IRCSock.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/IRCSock.cpp b/IRCSock.cpp index e5eb26d2..c41c5e48 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -640,11 +640,18 @@ bool CIRCSock::OnCTCPReply(CNick& Nick, CString& sMessage) { } bool CIRCSock::OnPrivCTCP(CNick& Nick, CString& sMessage) { + MODULECALL(OnPrivCTCP(Nick, sMessage), m_pUser, NULL, return true); + if (sMessage.TrimPrefix("ACTION ")) { MODULECALL(OnPrivAction(Nick, sMessage), m_pUser, NULL, return true); + + if (!m_pUser->IsUserAttached()) { + // If the user is detached, add to the buffer + m_pUser->AddQueryBuffer(":" + Nick.GetNickMask() + " PRIVMSG ", " :\001ACTION " + m_pUser->AddTimestamp(sMessage) + "\001"); + } + sMessage = "ACTION " + sMessage; } - MODULECALL(OnPrivCTCP(Nick, sMessage), m_pUser, NULL, return true); if (sMessage.Equals("DCC ", false, 4) && m_pUser && m_pUser->BounceDCCs() && m_pUser->IsUserAttached()) { // DCC CHAT chat 2453612361 44592