diff options
author | Wouter Coekaerts <coekie@irssi.org> | 2005-01-03 18:57:08 +0000 |
---|---|---|
committer | coekie <coekie@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2005-01-03 18:57:08 +0000 |
commit | a38c7d16315a0d5953b87cfc8ab25e3fbfe60d94 (patch) | |
tree | 2eb147adf99c3e14d9fa2014e797502cafe63469 /src/irc | |
parent | 124e79aeeb0966d6b7d710762922f3612e6ef1e8 (diff) | |
download | irssi-a38c7d16315a0d5953b87cfc8ab25e3fbfe60d94.zip |
Fix multiple entries for local IP in /etc/hosts prevents connecting, patch by eridius (Bug 167)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3697 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-servers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index a7d6729d..5d7953cd 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -142,8 +142,11 @@ static void server_init(IRC_SERVER_REC *server) } /* Replace ':' with '_' in our own hostname (the same IPv6 problem) */ + /* Replace '\n' and '\r' with '\0' in our own hostname to fix multiple PTR addreses */ for (ptr = hostname; *ptr != '\0'; ptr++) { if (*ptr == ':') *ptr = '_'; + if (*ptr == '\n') *ptr = '\0'; + if (*ptr == '\r') *ptr = '\0'; } /* don't allow hostname to begin with number or '+', '-'. those |