1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

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
This commit is contained in:
Wouter Coekaerts 2005-01-03 18:57:08 +00:00 committed by coekie
parent 124e79aeeb
commit a38c7d1631

View File

@ -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