From: Darren <darren@darrenwhitlen.com>
Date: Tue, 12 Aug 2014 15:13:33 +0000 (+0100)
Subject: User scripts cleanup for ControlInput events
X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f3f1547db12659b93a395b491a1da54e23a0e0b6;p=KiwiIRC.git

User scripts cleanup for ControlInput events
---

diff --git a/client/src/applets/scripteditor.js b/client/src/applets/scripteditor.js
index e75e075..9c0afe1 100644
--- a/client/src/applets/scripteditor.js
+++ b/client/src/applets/scripteditor.js
@@ -42,7 +42,7 @@
                 script_content += this.editor.getValue() + '\n';
 
                 // Add a dispose method to the user script for cleaning up
-                script_content += 'this._dispose = function(){ network.off(); if(this.dispose) this.dispose(); }';
+                script_content += 'this._dispose = function(){ network.off(); input.off(); if(this.dispose) this.dispose(); }';
 
                 // Try to compile the user script
                 try {