]> jfr.im git - irc/evilnet/znc.git/commitdiff
Add ZNC to CTCP VERSION reply even if client is connected.
authorAlexey Sokolov <redacted>
Sat, 31 Jan 2015 10:01:27 +0000 (10:01 +0000)
committerAlexey Sokolov <redacted>
Sat, 31 Jan 2015 10:01:27 +0000 (10:01 +0000)
Previously, it replied to CTCP VERSION, but only if no client is connected.

See https://github.com/znc/znc/issues/820#issuecomment-70506203

src/Client.cpp

index 463559f0cb23a33fd5bcc57cf06b58fc699005a6..fce774210b4cf2a844556e0a916cd520106eb60f 100644 (file)
@@ -234,6 +234,10 @@ void CClient::ReadLine(const CString& sData) {
                                sCTCP.LeftChomp();
                                sCTCP.RightChomp();
 
+                               if (sCTCP.Token(0) == "VERSION") {
+                                       sCTCP += " via " + CZNC::GetTag(false);
+                               }
+
                                NETWORKMODULECALL(OnUserCTCPReply(sTarget, sCTCP), m_pUser, m_pNetwork, this, &bContinue);
                                if (bContinue) continue;