mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
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.
This commit is contained in:
parent
19760679eb
commit
b7d82ecdce
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user