From a9aac1648c8e78b31296bf7f35b619f321be2190 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 6 Jan 2019 21:44:43 +0200 Subject: [PATCH] Relax identd checks to make it more compatible --- src/identification.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/identification.js b/src/identification.js index 099b3ee6..59d38522 100644 --- a/src/identification.js +++ b/src/identification.js @@ -56,11 +56,8 @@ class Identification { } for (const connection of this.connections.values()) { - if (connection.socket.remoteAddress === socket.remoteAddress - && connection.socket.remotePort === fport - && connection.socket.localPort === lport - && connection.socket.localAddress === socket.localAddress) { - return socket.write(`${lport}, ${fport} : USERID : UNIX : ${connection.user}\r\n`); + if (connection.socket.remotePort === fport && connection.socket.localPort === lport) { + return socket.write(`${lport}, ${fport} : USERID : TheLounge : ${connection.user}\r\n`); } } @@ -91,9 +88,7 @@ class Identification { let file = "# Warning: file generated by The Lounge: changes will be overwritten!\n"; this.connections.forEach((connection) => { - file += `to ${connection.socket.remoteAddress}` - + ` fport ${connection.socket.remotePort}` - + ` from ${connection.socket.localAddress}` + file += `fport ${connection.socket.remotePort}` + ` lport ${connection.socket.localPort}` + ` { reply "${connection.user}" }\n`; });