From 3afd81df9b58a1a0356a1104bb80d17165f5787b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Sun, 17 Aug 2014 16:17:11 +0200 Subject: Deal better with displaying IPv6 addresses --- zyklonb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'zyklonb.c') diff --git a/zyklonb.c b/zyklonb.c index 806de8b..d4e66ca 100644 --- a/zyklonb.c +++ b/zyklonb.c @@ -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; -- cgit v1.2.3