From: Darren Date: Fri, 1 Feb 2013 18:28:23 +0000 (+0000) Subject: WebListener object emitting updated event names X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=57566ca2da83aac0b789021db18cf321e2d4a8a7;p=KiwiIRC.git WebListener object emitting updated event names --- diff --git a/server/kiwi.js b/server/kiwi.js index 1361071..3f426a9 100755 --- a/server/kiwi.js +++ b/server/kiwi.js @@ -124,7 +124,7 @@ _.each(global.config.servers, function (server) { clients.add(client); }); - wl.on('destroy', function (client) { + wl.on('client_dispose', function (client) { clients.remove(client); }); diff --git a/server/weblistener.js b/server/weblistener.js index 3ab2437..c67939a 100644 --- a/server/weblistener.js +++ b/server/weblistener.js @@ -145,8 +145,8 @@ function authoriseConnection(handshakeData, callback) { function newConnection(websocket) { var client, that = this; client = new Client(websocket); - client.on('destroy', function () { - that.emit('destroy', this); + client.on('dispose', function () { + that.emit('client_dispose', this); }); this.emit('connection', client); }