From 8e3a124808ad3cace35a26c93f0a04e3749477cd Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 23 May 2014 14:48:52 +0100 Subject: [PATCH] WALLOPS should only show in channel/query panels for the current network --- client/src/models/network.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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}); } } -- 2.25.1