From: Darren Date: Fri, 27 Jun 2014 22:31:33 +0000 (+0100) Subject: Showing user quits in the query panel #538 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0d73046a81c4adc81f2276c21d8c189139268589;p=KiwiIRC.git Showing user quits in the query panel #538 --- diff --git a/client/src/models/network.js b/client/src/models/network.js index 9362a10..cc51bf5 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -356,11 +356,20 @@ quit_options.time = event.time; $.each(this.panels.models, function (index, panel) { - if (!panel.isChannel()) return; + // Let any query panels know they quit + if (panel.isQuery() && panel.get('name').toLowerCase() === event.nick.toLowerCase()) { + panel.addMsg(' ', styleText('channel_quit', { + nick: event.nick, + text: translateText('client_models_channel_quit', [quit_options.message]) + }), 'action quit', {time: quit_options.time}); + } - member = panel.get('members').getByNick(event.nick); - if (member) { - panel.get('members').remove(member, {kiwi: quit_options}); + // Remove the nick from any channels + if (panel.isChannel()) { + member = panel.get('members').getByNick(event.nick); + if (member) { + panel.get('members').remove(member, {kiwi: quit_options}); + } } }); }