From 54867320dcbc778c63c1678ccd580d58a806a70d Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 22 Mar 2008 18:39:11 +0000 Subject: [PATCH] Fix sf bug #1915864 (patch from x-x) If you do /names #chan when you are not in #chan, you never got the reply. Thanks to Xaquseg for reporting. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@990 726aef4b-f618-498e-8847-2d620e286838 --- IRCSock.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IRCSock.cpp b/IRCSock.cpp index 81385d4c..d666ca6e 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -329,8 +329,12 @@ void CIRCSock::ReadLine(const CString& sData) { sRest.Trim(); // Todo: allow for non @+= server msgs CChan* pChan = m_pUser->FindChan(sRest.Token(1)); - if (!pChan) // Todo: should this still be forwarded to clients? + if (!pChan) { + // If we don't know that channel, a client might have + // sent a /names on it's own -> forward it. + m_pUser->PutUser(sLine); return; + } CString sNicks = sRest.Token(2, true); if (sNicks.Left(1) == ":") {