+/**
+ * When a socket connects to an IRCd
+ * May be called before any socket handshake are complete (eg. TLS)
+ */
+var rawSocketConnect = function(socket) {
+ // Make note of the port numbers for any identd lookups
+ // Nodejs < 0.9.6 has no socket.localPort so check this first
+ if (typeof socket.localPort != 'undefined') {
+ this.identd_port_pair = socket.localPort.toString() + '_' + socket.remotePort.toString();
+ global.clients.port_pairs[this.identd_port_pair] = this;
+ }
+};
+