mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Changed CTCPReply to reply even when user is attached
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@417 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
27
IRCSock.cpp
27
IRCSock.cpp
@@ -676,23 +676,22 @@ bool CIRCSock::OnPrivCTCP(const CString& sNickMask, CString& sMessage) {
|
||||
|
||||
return true;
|
||||
} else {
|
||||
if (!IsUserAttached()) {
|
||||
const MCString& mssCTCPReplies = m_pUser->GetCTCPReplies();
|
||||
MCString::const_iterator it = mssCTCPReplies.find(sMessage.AsUpper());
|
||||
CString sQuery = sMessage.Token(0).AsUpper();
|
||||
CString sReply;
|
||||
const MCString& mssCTCPReplies = m_pUser->GetCTCPReplies();
|
||||
MCString::const_iterator it = mssCTCPReplies.find(sMessage.AsUpper());
|
||||
CString sQuery = sMessage.Token(0).AsUpper();
|
||||
CString sReply;
|
||||
|
||||
if (it != mssCTCPReplies.end()) {
|
||||
sReply = it->second;
|
||||
}
|
||||
if (it != mssCTCPReplies.end()) {
|
||||
sReply = it->second;
|
||||
}
|
||||
|
||||
if (sReply.empty() && sQuery == "VERSION") {
|
||||
sReply = "ZNC by prozac - http://znc.sourceforge.net";
|
||||
}
|
||||
if (sReply.empty() && sQuery == "VERSION" && !IsUserAttached()) {
|
||||
sReply = "ZNC by prozac - http://znc.sourceforge.net";
|
||||
}
|
||||
|
||||
if (!sReply.empty()) {
|
||||
PutServ("NOTICE " + CNick(sNickMask).GetNick() + " :\001" + sQuery + " " + sReply + "\001");
|
||||
}
|
||||
if (!sReply.empty()) {
|
||||
PutServ("NOTICE " + CNick(sNickMask).GetNick() + " :\001" + sQuery + " " + sReply + "\001");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user