Added VersionReply config option

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@167 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-04-23 16:30:57 +00:00
parent 77798b286a
commit b69a6419ab
5 changed files with 21 additions and 2 deletions
+12 -2
View File
@@ -613,8 +613,18 @@ bool CIRCSock::OnPrivCTCP(const string& sNickMask, string& sMessage) {
}
#endif
// DCC CHAT chat 2453612361 44592
if (strncasecmp(sMessage.c_str(), "DCC ", 4) == 0) {
if (strcasecmp(sMessage.c_str(), "VERSION") == 0) {
if (!IsUserAttached()) {
string sVersionReply = m_pUser->GetVersionReply();
if (sVersionReply.empty()) {
sVersionReply = "ZNC by prozac - http://znc.sourceforge.net";
}
PutServ("NOTICE " + CNick(sNickMask).GetNick() + " :\001VERSION " + sVersionReply + "\001");
}
} else if (strncasecmp(sMessage.c_str(), "DCC ", 4) == 0) {
// DCC CHAT chat 2453612361 44592
string sType = CUtils::Token(sMessage, 1);
string sFile = CUtils::Token(sMessage, 2);
unsigned long uLongIP = strtoul(CUtils::Token(sMessage, 3).c_str(), NULL, 10);