route_replies: Send 353 through ForwardRaw353()

Before, route_replies bypassed this function which caused "wrong" replies to
/names, because clients who didnt understand it still got NAMESX and UHNAMES
replies.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1811 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-03-07 13:24:14 +00:00
parent ec0d52e675
commit 3e780e8058
2 changed files with 12 additions and 5 deletions
+8 -3
View File
@@ -8,6 +8,7 @@
#include "znc.h"
#include "User.h"
#include "IRCSock.h"
struct reply {
const char *szReply;
@@ -214,7 +215,7 @@ public:
while (m_pReplies[i].szReply != NULL) {
if (m_pReplies[i].szReply == sCmd) {
if (RouteReply(sLine, m_pReplies[i].bLastResponse))
if (RouteReply(sLine, m_pReplies[i].bLastResponse, sCmd == "353"))
return HALTCORE;
return CONTINUE;
}
@@ -277,12 +278,16 @@ public:
}
private:
bool RouteReply(const CString& sLine, bool bFinished = false)
bool RouteReply(const CString& sLine, bool bFinished = false, bool bIsRaw353 = false)
{
if (!m_pDoing)
return false;
m_pDoing->PutClient(sLine);
// 353 needs special treatment due to NAMESX and UHNAMES
if (bIsRaw353)
GetUser()->GetIRCSock()->ForwardRaw353(sLine, m_pDoing);
else
m_pDoing->PutClient(sLine);
if (bFinished) {
// Stop the timeout