summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorkyak <bas@bmail.ru>2015-08-29 15:32:22 +0300
committerkyak <bas@bmail.ru>2015-08-29 15:32:22 +0300
commitb7d82ecdcee3224ca5280977d0ffd7b5e0fb07d2 (patch)
tree0864acd29e30a987b5d46b17695b739fd84b0915 /src/irc
parent19760679eb141baf3bff2110ee03aec90c653a2a (diff)
downloadirssi-b7d82ecdcee3224ca5280977d0ffd7b5e0fb07d2.zip
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.
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/irc-expandos.c4
1 files 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);
}