mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -76,11 +76,13 @@ public:
|
||||
// This is true if we are past raw 001
|
||||
bool IsAuthed() const { return m_bAuthed; }
|
||||
// !Getters
|
||||
|
||||
// This handles NAMESX and UHNAMES in a raw 353 reply
|
||||
void ForwardRaw353(const CString& sLine) const;
|
||||
void ForwardRaw353(const CString& sLine, CClient* pClient) const;
|
||||
private:
|
||||
void SetNick(const CString& sNick);
|
||||
void ParseISupport(const CString& sLine);
|
||||
void ForwardRaw353(const CString& sLine) const;
|
||||
void ForwardRaw353(const CString& sLine, CClient* pClient) const;
|
||||
// This is called when we connect and the nick we want is already taken
|
||||
void SendAltNick(const CString& sBadNick);
|
||||
protected:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user