From b7d82ecdcee3224ca5280977d0ffd7b5e0fb07d2 Mon Sep 17 00:00:00 2001 From: kyak Date: Sat, 29 Aug 2015 15:32:22 +0300 Subject: [PATCH] Use "(none)" as fallback for hostname and userhost expandos Use "(none)" instead of "??" for hostname and userhost expandos when these can't be reliably detected. --- src/irc/core/irc-expandos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c index 4aa50c52..df0326a2 100644 --- a/src/irc/core/irc-expandos.c +++ b/src/irc/core/irc-expandos.c @@ -72,7 +72,7 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret) username = ircserver->connrec->username; if (gethostname(hostname, sizeof(hostname)) != 0 || *hostname == '\0') - strcpy(hostname, "??"); + strcpy(hostname, "(none)"); return g_strconcat(username, "@", hostname, NULL);; } @@ -98,7 +98,7 @@ static char *expando_hostname(SERVER_REC *server, void *item, int *free_ret) /* haven't received userhost reply yet. guess something */ if (gethostname(hostname, sizeof(hostname)) != 0 || *hostname == '\0') - strcpy(hostname, "??"); + strcpy(hostname, "(none)"); return g_strdup(hostname); }