From 7cc8c4ad080dc766df90cc48c57e8a1f738d24d2 Mon Sep 17 00:00:00 2001 From: Darren Date: Thu, 23 Jan 2014 22:28:46 +0000 Subject: [PATCH] Identd + SSL fixes --- server/kiwi.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/kiwi.js b/server/kiwi.js index 81dac34..cd25155 100755 --- a/server/kiwi.js +++ b/server/kiwi.js @@ -240,13 +240,16 @@ _.each(global.config.servers, function (server) { }); serv.on('socket_connected', function(pipe) { - pipe.identd_pair = pipe.irc_socket.localPort.toString() + '_' + pipe.irc_socket.remotePort.toString(); - console.log('[IDENTD] opened ' + pipe.identd_pair); + // SSL connections have the raw socket as a property + var socket = pipe.irc_socket.socket ? + pipe.irc_socket.socket : + pipe.irc_socket; + + pipe.identd_pair = socket.localPort.toString() + '_' + socket.remotePort.toString(); global.clients.port_pairs[pipe.identd_pair] = pipe.meta; }); serv.on('connection_close', function(pipe) { - console.log('[IDENTD] closed ' + pipe.identd_pair); delete global.clients.port_pairs[pipe.identd_pair]; }); -- 2.25.1