Emit 'dispose' on a dispose call instead of 'destroy'
authorDarren <darren@darrenwhitlen.com>
Thu, 31 Jan 2013 14:48:47 +0000 (14:48 +0000)
committerDarren <darren@darrenwhitlen.com>
Thu, 31 Jan 2013 14:58:45 +0000 (14:58 +0000)
server/client.js
server/irc/state.js

index ddcb31249f5f91fb8a47b0f959a43e661cb74000..4bfeb1bf44beddcff72cef6c10b36c0e909a9bb9 100755 (executable)
@@ -68,7 +68,7 @@ Client.prototype.sendKiwiCommand = function (command, data, callback) {
 };
 
 Client.prototype.dispose = function () {
-    this.emit('destroy');
+    this.emit('dispose');
     this.removeAllListeners();
 };
 
index e43f76bdfdf7cff608fbfebba1b8258b11fa0a61..aa531bee12fc87bf60cf2abe0aed1b5e2b34ba6a 100755 (executable)
@@ -13,7 +13,7 @@ var State = function (client, save_state) {
     this.irc_connections = [];
     this.next_connection = 0;
     
-    this.client.on('destroy', function () {
+    this.client.on('dispose', function () {
         if (!that.save_state) {
             _.each(that.irc_connections, function (irc_connection, i, cons) {
                 if (irc_connection) {
@@ -85,6 +85,6 @@ State.prototype.sendKiwiCommand = function () {
 };
 
 State.prototype.dispose = function () {
-    this.emit('destroy');
+    this.emit('dispose');
     this.removeAllListeners();
 };