From 65ccc5bfcec213b16fa048714d69bfc8b9e3b516 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 20 Jan 2017 10:02:16 -0500 Subject: [PATCH] send actual local address to webirc --- I2PTunnel.cpp | 2 +- I2PTunnel.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/I2PTunnel.cpp b/I2PTunnel.cpp index 843d129f..6a9b3ffd 100644 --- a/I2PTunnel.cpp +++ b/I2PTunnel.cpp @@ -302,7 +302,7 @@ namespace client if (m_NeedsWebIrc) { m_NeedsWebIrc = false; - m_OutPacket << "WEBIRC " << m_WebircPass << " cgiirc " << context.GetAddressBook ().ToAddress (m_From->GetIdentHash ()) << " 127.0.0.1\n"; + m_OutPacket << "WEBIRC " << m_WebircPass << " cgiirc " << context.GetAddressBook ().ToAddress (m_From->GetIdentHash ()) << " " << GetSocket ()->local_endpoint ().address () << std::endl; } m_InPacket.clear (); diff --git a/I2PTunnel.h b/I2PTunnel.h index 4b9b2c9b..68f46e43 100644 --- a/I2PTunnel.h +++ b/I2PTunnel.h @@ -53,6 +53,8 @@ namespace client void HandleStreamReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred); void HandleConnect (const boost::system::error_code& ecode); + std::shared_ptr GetSocket () const { return m_Socket; }; + private: uint8_t m_Buffer[I2P_TUNNEL_CONNECTION_BUFFER_SIZE], m_StreamBuffer[I2P_TUNNEL_CONNECTION_BUFFER_SIZE];