Deal better with displaying IPv6 addresses

This commit is contained in:
2014-08-17 16:17:11 +02:00
parent 8632e5fe83
commit 3afd81df9b
3 changed files with 30 additions and 12 deletions

View File

@@ -355,7 +355,10 @@ irc_establish_connection (struct bot_context *ctx,
real_host = buf;
// XXX: we shouldn't mix these statuses with `struct error'; choose 1!
print_status ("connecting to `%s:%s'...", real_host, port);
char *address = format_host_port_pair (real_host, port);
print_status ("connecting to %s...", address);
free (address);
if (!connect (sockfd, gai_iter->ai_addr, gai_iter->ai_addrlen))
break;