mirror of
https://github.com/znc/znc.git
synced 2026-05-08 22:34:45 +02:00
Add a new DCCVHost config option
If this option is set to an ip address, this one is used as the local address for DCC connections. This can e.g. be used to "fix" DCC bouncing with ipv6 connections. Without it, this just more or less fails badly. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1647 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+6
-4
@@ -650,15 +650,17 @@ bool CIRCSock::OnPrivCTCP(CNick& Nick, CString& sMessage) {
|
||||
|
||||
if (sType.Equals("CHAT")) {
|
||||
CNick FromNick(Nick.GetNickMask());
|
||||
unsigned short uBNCPort = CDCCBounce::DCCRequest(FromNick.GetNick(), uLongIP, uPort, "", true, m_pUser, GetLocalIP(), CUtils::GetIP(uLongIP));
|
||||
unsigned short uBNCPort = CDCCBounce::DCCRequest(FromNick.GetNick(), uLongIP, uPort, "", true, m_pUser, CUtils::GetIP(uLongIP));
|
||||
if (uBNCPort) {
|
||||
m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + GetNick() + " :\001DCC CHAT chat " + CString(CUtils::GetLongIP(GetLocalIP())) + " " + CString(uBNCPort) + "\001");
|
||||
CString sIP = m_pUser->GetLocalDCCIP();
|
||||
m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + GetNick() + " :\001DCC CHAT chat " + CString(CUtils::GetLongIP(sIP)) + " " + CString(uBNCPort) + "\001");
|
||||
}
|
||||
} else if (sType.Equals("SEND")) {
|
||||
// DCC SEND readme.txt 403120438 5550 1104
|
||||
unsigned short uBNCPort = CDCCBounce::DCCRequest(Nick.GetNick(), uLongIP, uPort, sFile, false, m_pUser, GetLocalIP(), CUtils::GetIP(uLongIP));
|
||||
unsigned short uBNCPort = CDCCBounce::DCCRequest(Nick.GetNick(), uLongIP, uPort, sFile, false, m_pUser, CUtils::GetIP(uLongIP));
|
||||
if (uBNCPort) {
|
||||
m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + GetNick() + " :\001DCC SEND " + sFile + " " + CString(CUtils::GetLongIP(GetLocalIP())) + " " + CString(uBNCPort) + " " + CString(uFileSize) + "\001");
|
||||
CString sIP = m_pUser->GetLocalDCCIP();
|
||||
m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + GetNick() + " :\001DCC SEND " + sFile + " " + CString(CUtils::GetLongIP(sIP)) + " " + CString(uBNCPort) + " " + CString(uFileSize) + "\001");
|
||||
}
|
||||
} else if (sType.Equals("RESUME")) {
|
||||
// Need to lookup the connection by port, filter the port, and forward to the user
|
||||
|
||||
Reference in New Issue
Block a user