Correctly sending irc disconnected error to browser
authorDarren <darren@darrenwhitlen.com>
Wed, 2 Jul 2014 00:06:07 +0000 (01:06 +0100)
committerDarren <darren@darrenwhitlen.com>
Wed, 2 Jul 2014 00:06:07 +0000 (01:06 +0100)
client/src/models/network.js
server/irc/state.js

index cc51bf5a222edfd4d8fdfc0a006866e2fb2da7bd..894583d55fc5c06179fbfeef5f8be57da5f9e23e 100644 (file)
 
     function onDisconnect(event) {
         $.each(this.panels.models, function (index, panel) {
-            panel.addMsg('', styleText('network_disconnected', {text: translateText('client_models_network_disconnected', [])}), 'action quit');
+            if (!panel.isApplet()) {
+                panel.addMsg('', styleText('network_disconnected', {text: translateText('client_models_network_disconnected', [])}), 'action quit');
+            }
         });
     }
 
index bd89fcca1afe273e8ea42994e29d2116f9b24c4a..92bc35be5550b06face35b98abefc79718927060 100755 (executable)
@@ -72,7 +72,7 @@ State.prototype.connect = function (hostname, port, ssl, nick, user, options, ca
 
     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'});
+        that.sendIrcCommand('disconnect', {connection_id: con.con_num, reason: 'disconnected'});
 
         that.irc_connections[con_num] = null;
         global.servers.removeConnection(this);