Make 'CTCPReply = VERSION' in the config cause ZNC to ignore CTCP VERSIONs

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@871 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-11-12 21:32:29 +00:00
parent 74213c9a4f
commit 65eb10a30e
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -776,6 +776,7 @@ bool CIRCSock::OnPrivCTCP(CNick& Nick, CString& sMessage) {
const MCString& mssCTCPReplies = m_pUser->GetCTCPReplies();
MCString::const_iterator it = mssCTCPReplies.find(sMessage.AsUpper());
CString sQuery = sMessage.Token(0).AsUpper();
bool bHaveReply = false;
CString sReply;
if (it == mssCTCPReplies.end()) {
@@ -784,9 +785,10 @@ bool CIRCSock::OnPrivCTCP(CNick& Nick, CString& sMessage) {
if (it != mssCTCPReplies.end()) {
sReply = it->second;
bHaveReply = true;
}
if (sReply.empty() && !m_pUser->IsUserAttached()) {
if (!bHaveReply && !m_pUser->IsUserAttached()) {
if (sQuery == "VERSION") {
sReply = CZNC::GetTag();
} else if (sQuery == "PING") {