From d978803965ac26c26ca9cbf4371a0e1e5f37e1d8 Mon Sep 17 00:00:00 2001 From: prozacx Date: Wed, 22 Mar 2006 08:15:36 +0000 Subject: [PATCH] Added code to OnUserPart() so user never actually parts the chan on irc git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@709 726aef4b-f618-498e-8847-2d620e286838 --- modules/stickychan.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/stickychan.cpp b/modules/stickychan.cpp index 6a19c37e..98bb5826 100644 --- a/modules/stickychan.cpp +++ b/modules/stickychan.cpp @@ -18,7 +18,27 @@ public: { } - virtual bool OnLoad(const CString& sArgs); + virtual bool OnLoad( const CString& sArgs ); + + virtual EModRet OnUserPart( CString& sChannel, CString& sMessage ) + { + for ( MCString::iterator it = BeginNV(); it != EndNV(); it++ ) + { + if ( sChannel.CaseCmp( it->first ) == 0 ) + { + CChan* pChan = m_pUser->FindChan( sChannel ); + + if ( pChan ) + { + pChan->JoinUser( true, "", m_pClient ); + } + + return HALT; + } + } + + return CONTINUE; + } virtual void OnModCommand( const CString& sCommand ) {