From 23acbe42a6c244c3ce132f55ae06d01a959ccc5b Mon Sep 17 00:00:00 2001 From: Toon Schoenmakers Date: Sun, 25 Sep 2011 01:58:23 +0200 Subject: [PATCH] Implemented a OnInvite hook This hook will be called when the user get's invited into a channel because we don't have a CChan of this channel yet this won't be send through the hook. Instead a CString with the name of the channel is send. Signed-off-by: Toon Schoenmakers --- IRCSock.cpp | 2 ++ Modules.cpp | 2 ++ Modules.h | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/IRCSock.cpp b/IRCSock.cpp index ff40d730..7867f6d6 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -711,6 +711,8 @@ void CIRCSock::ReadLine(const CString& sData) { } // Don't forward any CAP stuff to the client return; + } else if (sCmd.Equals("INVITE")) { + NETWORKMODULECALL(OnInvite(sLine.Token(3).TrimPrefix_n(":")), m_pNetwork->GetUser(), m_pNetwork, NULL, NOTHING); } } diff --git a/Modules.cpp b/Modules.cpp index 7d1a9fec..33600418 100644 --- a/Modules.cpp +++ b/Modules.cpp @@ -513,6 +513,7 @@ void CModule::OnNick(const CNick& Nick, const CString& sNewNick, const vector