Last active
August 29, 2015 14:11
-
-
Save esantoro/d20dc753a59ffe1728c3 to your computer and use it in GitHub Desktop.
Xchat plugin to make thinklight blink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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