Skip to content

Instantly share code, notes, and snippets.

@esantoro
Last active August 29, 2015 14:11
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 esantoro/d20dc753a59ffe1728c3 to your computer and use it in GitHub Desktop.
Save esantoro/d20dc753a59ffe1728c3 to your computer and use it in GitHub Desktop.
Xchat plugin to make thinklight blink
use strict;
use warnings;
Xchat::register('ThinkLight', '0.1', 'Make thinklight blink when called on IRC');
Xchat::hook_server('PRIVMSG', \&match_nickname);
Xchat::print(" Registered Thinklight event handler ");
sub match_nickname {
my $nick = Xchat::get_info('nick') ;
if ($_[1][0] =~ /$nick/){
thinklight() ;
}
return Xchat::EAT_NONE;
}
sub thinklight
{
system("thinkalert 5 100000") ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment