mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02: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
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue