From e3c3342ef24cf0c6fc8ecc41ae293d3b6a0d5ee6 Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 2 Aug 2013 12:08:43 +0100 Subject: [PATCH] Naming IrcConnection event handlers in State --- server/irc/state.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/irc/state.js b/server/irc/state.js index 67d8351..77ad4cb 100755 --- a/server/irc/state.js +++ b/server/irc/state.js @@ -59,17 +59,17 @@ State.prototype.connect = function (hostname, port, ssl, nick, user, pass, callb this.irc_connections[con_num] = con; - con.on('connected', function () { + con.on('connected', function IrcConnectionConnection() { global.servers.addConnection(this); return callback(null, con_num); }); - con.on('error', function (err) { + con.on('error', function IrcConnectionError(err) { console.log('irc_connection error (' + hostname + '):', err); return callback(err.code, {server: con_num, error: err}); }); - con.on('close', function () { + con.on('close', function IrcConnectionClose() { // TODO: Can we get a better reason for the disconnection? Was it planned? that.sendIrcCommand('disconnect', {server: con.con_num, reason: 'disconnected'}); -- 2.25.1