mirror of
https://github.com/znc/znc.git
synced 2026-08-03 15:33:02 +02:00
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:
+3
-1
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user