From: Darren Date: Thu, 23 Jan 2014 22:28:46 +0000 (+0000) Subject: Identd + SSL fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7cc8c4ad080dc766df90cc48c57e8a1f738d24d2;p=KiwiIRC.git Identd + SSL fixes --- 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]; });