mirror of
https://github.com/thelounge/thelounge
synced 2024-11-15 00:37:13 +00:00
Merge pull request #2095 from thelounge/xpaw/banlist-lobby
Send empty banlist error to lobby for channels user is not in
This commit is contained in:
commit
3074251be9
1 changed files with 10 additions and 1 deletions
|
@ -16,7 +16,16 @@ module.exports = function(irc, network) {
|
|||
type: Msg.Type.ERROR,
|
||||
text: "Banlist empty",
|
||||
});
|
||||
network.getChannel(channel).pushMessage(client, msg, true);
|
||||
let chan = network.getChannel(channel);
|
||||
|
||||
// Send error to lobby if we receive banlist for a channel we're not in
|
||||
if (typeof chan === "undefined") {
|
||||
msg.showInActive = true;
|
||||
chan = network.channels[0];
|
||||
}
|
||||
|
||||
chan.pushMessage(client, msg, true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue