* ---------------------------------------------------
*/
+/* $Core: libIRCDsocket */
+
#include "inspircd.h"
#include "socket.h"
#include "socketengine.h"
}
}
-void ListenSocket::HandleEvent(EventType et, int errornum)
+void ListenSocket::HandleEvent(EventType, int)
{
sockaddr* sock_us = new sockaddr[2]; // our port number
sockaddr* client = new sockaddr[2];
}
}
ServerInstance->stats->statsAccept++;
- userrec::AddClient(ServerInstance, incomingSockfd, in_port, false, this->family, client);
+ User::AddClient(ServerInstance, incomingSockfd, in_port, false, this->family, client);
}
else
{
{
int sockfd;
int on = 1;
- struct linger linger = { 0 };
+ addr = addr;
+ struct linger linger = { 0, 0 };
#ifdef IPV6
if (strchr(addr,':') || (!*addr))
sockfd = socket (PF_INET6, socktype, 0);
}
}
-int InspIRCd::BindPorts(bool bail, int &ports_found, FailedPortList &failed_ports)
+int InspIRCd::BindPorts(bool, int &ports_found, FailedPortList &failed_ports)
{
char configToken[MAXBUF], Addr[MAXBUF], Type[MAXBUF];
int bound = 0;
Config->ConfValue(Config->config_data, "bind", "port", count, configToken, MAXBUF);
Config->ConfValue(Config->config_data, "bind", "address", count, Addr, MAXBUF);
Config->ConfValue(Config->config_data, "bind", "type", count, Type, MAXBUF);
-
+
+ if (strncmp(Addr, "::ffff:", 7) == 0)
+ this->Log(DEFAULT, "Using 4in6 (::ffff:) isn't recommended. You should bind IPv4 addresses directly instead.");
+
if ((!*Type) || (!strcmp(Type,"clients")))
{
irc::portparser portrange(configToken, false);