X-Git-Url: http://git.pk910.de/?p=NextIRCd.git;a=blobdiff_plain;f=src%2Fircd_auth.c;fp=src%2Fircd_auth.c;h=c2ec7285a7d3a2087ab226aa4d2a58a226a2f0b3;hp=8079db1c78ff89092687b1ca5a1be44eba316dca;hb=40162886a576c23a3ac2189dede4cb8216bc0c8e;hpb=e17a8a5dc929df2a5ae6169f1955fcde7c70e04b diff --git a/src/ircd_auth.c b/src/ircd_auth.c index 8079db1..c2ec728 100644 --- a/src/ircd_auth.c +++ b/src/ircd_auth.c @@ -19,6 +19,7 @@ #include "struct_auth.h" #include "struct_connection.h" +#include "ircd_auth.h" #include "ircd_client.h" #include "IOHandler/IOSockets.h" #include "IOHandler/IODNSLookup.h" @@ -66,11 +67,7 @@ static IODNS_CALLBACK(auth_dns_callback) { client_printf(auth->conn, "NOTICE AUTH :*** Found your hostname (%s)", auth->host); } else { struct IODNSAddress *sockaddr = iosocket_get_remote_addr(auth->conn->socket); - if(auth->conn->ipv6) - inet_ntop(AF_INET6, (void *)(&((struct sockaddr_in6 *)sockaddr->address)->sin6_addr), auth->host, HOSTLEN); - else - inet_ntop(AF_INET, (void *)(&((struct sockaddr_in *)sockaddr->address)->sin_addr), auth->host, HOSTLEN); - + iodns_print_address(sockaddr, auth->conn->socket->ipv6, auth->host, HOSTLEN); client_printf(auth->conn, "NOTICE AUTH :*** Couldn't look up your hostname. Using your IP instead (%s)", auth->host); } if(dnsresult)