Skip to content

Instantly share code, notes, and snippets.

@sotarok
Created January 31, 2009 04:52
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 sotarok/55441 to your computer and use it in GitHub Desktop.
Save sotarok/55441 to your computer and use it in GitHub Desktop.
// limechat popup script
var list = [
'nequal'
,'phpstudy'
,'twitter'
,'wassr'
];
function checkBalloon(prefix, channel, text)
{
if (prefix.nick == myNick
|| appActive) {
return ;
}
for (k in list) {
var regChannel = new RegExp(list[k], "i");
if (channel.match(regChannel)) {
showBalloon(channel + " / " + prefix.nick, text);
}
}
}
function event::onChannelText(prefix, channel, text)
{
checkBalloon(prefix, channel, text);
}
function event::onChannelNotice(prefix, channel, text)
{
checkBalloon(prefix, channel, text);
}
function event::onChannelAction(prefix, channel, text)
{
checkBalloon(prefix, channel, text);
}
function event::onTalkText(prefix, targetNick, text)
{
checkBalloon(prefix, channel, text);
}
function event::onTalkNotice(prefix, targetNick, text)
{
checkBalloon(prefix, channel, text);
}
function event::onTalkAction(prefix, targetNick, text)
{
checkBalloon(prefix, channel, text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment