From 85700bdee37eb72df86321b09d68873ca0e3cd0a Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 5 Dec 2015 18:04:32 +0000 Subject: [PATCH] Add a comment for #820 and #1012 --- src/Client.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Client.cpp b/src/Client.cpp index 1367ca79..0a2f6d57 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -913,6 +913,23 @@ bool CClient::OnCTCPMessage(CCTCPMessage& Message) if (Message.IsReply()) { CString sCTCP = Message.GetText(); if (sCTCP.Token(0) == "VERSION") { + // There are 2 different scenarios: + // + // a) CTCP reply for VERSION is not set. + // 1. ZNC receives CTCP VERSION from someone + // 2. ZNC forwards CTCP VERSION to client + // 3. Client replies with something + // 4. ZNC adds itself to the reply + // 5. ZNC sends the modified reply to whoever asked + // + // b) CTCP reply for VERSION is set. + // 1. ZNC receives CTCP VERSION from someone + // 2. ZNC replies with the configured reply (or just drops it if empty), without forwarding anything to client + // 3. Client does not see any CTCP request, and does not reply + // + // So, if user doesn't want "via ZNC" in CTCP VERSION reply, they can set custom reply. + // + // See more bikeshedding at github issues #820 and #1012 Message.SetText(sCTCP + " via " + CZNC::GetTag(false)); } }