+ incoming = Instance->SE->Accept(this, client, &length);
+#ifdef IPV6
+ if ((!*this->host) || strchr(this->host, ':'))
+ {
+ char buf[1024];
+ recvip = inet_ntop(AF_INET6, &((sockaddr_in6*)client)->sin6_addr, buf, sizeof(buf));
+ }
+ else
+#endif
+ {
+ // FIX: we were doing this for IPv6 connections as well, which was fucking recvip..
+ // Add brackets to make this a bit clearer. -- w00t (Jan 15, 2008)
+ recvip = inet_ntoa(((sockaddr_in*)client)->sin_addr);
+ }
+
+ Instance->SE->NonBlocking(incoming);
+
+ this->OnIncomingConnection(incoming, (char*)recvip.c_str());
+
+ if (this->IsIOHooked)
+ {
+ try
+ {
+ Instance->Config->GetIOHook(this)->OnRawSocketAccept(incoming, recvip.c_str(), this->port);
+ }
+ catch (CoreException& modexcept)
+ {
+ Instance->Logs->Log("SOCKET",DEBUG,"%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason());
+ }
+ }
+
+ this->SetQueues(incoming);
+
+ delete[] client;