From 91236ed794b4085a8aa0f4a0a24913c29d0aa69e Mon Sep 17 00:00:00 2001 From: Darren Date: Wed, 2 Jul 2014 01:06:07 +0100 Subject: [PATCH] Correctly sending irc disconnected error to browser --- client/src/models/network.js | 4 +++- server/irc/state.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/models/network.js b/client/src/models/network.js index cc51bf5..894583d 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -240,7 +240,9 @@ 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'); + } }); } diff --git a/server/irc/state.js b/server/irc/state.js index bd89fcc..92bc35b 100755 --- a/server/irc/state.js +++ b/server/irc/state.js @@ -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); -- 2.25.1