From: Darren Date: Fri, 23 May 2014 13:48:52 +0000 (+0100) Subject: WALLOPS should only show in channel/query panels for the current network X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8e3a124808ad3cace35a26c93f0a04e3749477cd;p=KiwiIRC.git WALLOPS should only show in channel/query panels for the current network --- diff --git a/client/src/models/network.js b/client/src/models/network.js index 1f351ae..e3d4d78 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -872,11 +872,14 @@ function onWallops(event) { + var active_panel = _kiwi.app.panels().active; + // Send to server panel this.panels.server.addMsg('[' + (event.nick||'') + ']', styleText('wallops', {text: event.msg}), 'wallops', {time: event.time}); - // Send to active panel - if (_kiwi.app.panels().active !== this.panels.server) - _kiwi.app.panels().active.addMsg('[' + (event.nick||'') + ']', styleText('wallops', {text: event.msg}), 'wallops', {time: event.time}); + + // Send to active panel if its a channel/query *and* it's related to this network + if (active_panel !== this.panels.server && (active_panel.isChannel() || active_panel.isQuery()) && active_panel.get('network') === this) + active_panel.addMsg('[' + (event.nick||'') + ']', styleText('wallops', {text: event.msg}), 'wallops', {time: event.time}); } }