summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-servers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core/irc-servers.c')
-rw-r--r--src/irc/core/irc-servers.c3
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