Skip to content

Instantly share code, notes, and snippets.

@prawnsalad
Last active December 22, 2019 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prawnsalad/c1d3a35c51aef45644a6daa7fd0ca044 to your computer and use it in GitHub Desktop.
Save prawnsalad/c1d3a35c51aef45644a6daa7fd0ca044 to your computer and use it in GitHub Desktop.
kiwi.plugin('myplugin', function(kiwi) {
kiwi.on('irc.message', function(message, network, event) {
if (message.nick === '*bnc' && message.message) {
// Only show *bnc messages if we have the buffer open.
// We don't want confusing messages to users
let buffer = network.bufferByName('*bnc');
if (!buffer) {
event.handled = true;
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment