]> jfr.im git - irc/irssi/irssi.git/commitdiff
Use "(none)" as fallback for hostname and userhost expandos
authorkyak <redacted>
Sat, 29 Aug 2015 12:32:22 +0000 (15:32 +0300)
committerkyak <redacted>
Sat, 29 Aug 2015 12:32:22 +0000 (15:32 +0300)
Use "(none)" instead of "??" for hostname and userhost expandos
when these can't be reliably detected.

src/irc/core/irc-expandos.c

index 4aa50c52d64b8e62519621e59812668f9f1bd90b..df0326a270a2c7bb9e56284a6dbdd07b3a4bc536 100644 (file)
@@ -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);
 }