From 0dda9fb325a4d0053652f937ad06e44942357cc1 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 27 Nov 2005 16:19:24 +0000 Subject: Added /CONNECT git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1968 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/socket.cpp') diff --git a/src/socket.cpp b/src/socket.cpp index 67ff65c70..aa028b8a5 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -94,6 +94,8 @@ InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long ip = inet_ntoa(*ia); } + this->IP = ip; + timeout_end = time(NULL)+maxtime; timeout = false; if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) @@ -138,6 +140,11 @@ void InspSocket::Close() } } +std::string InspSocket::GetIP() +{ + return this->IP; +} + char* InspSocket::Read() { int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); -- cgit v1.3.1-10-gc9f91