From: Darren Date: Wed, 2 Jul 2014 00:06:07 +0000 (+0100) Subject: Correctly sending irc disconnected error to browser X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=91236ed794b4085a8aa0f4a0a24913c29d0aa69e;p=KiwiIRC.git Correctly sending irc disconnected error to browser --- 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);