From d46db0aac208fbdb25008de670306c03d0f1f49e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 20 Sep 2001 17:56:33 +0000 Subject: When using /SET hostname ipv6:address, replace the ':' char with '_' so it won't break the USER command which is sent to server at connect. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1806 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/irc-servers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 6ff6ff7d..6933361a 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -145,6 +145,11 @@ static void server_init(IRC_SERVER_REC *server) address = ptr+1; } + /* Replace ':' with '_' in our own hostname (the same IPv6 problem) */ + for (ptr = hostname; *ptr != '\0'; ptr++) { + if (*ptr == ':') *ptr = '_'; + } + username = g_strdup(conn->username); ptr = strchr(username, ' '); if (ptr != NULL) *ptr = '\0'; -- cgit v1.2.3