#!/usr/bin/perl $name="xchat-thinklight"; $version="v0.0.1a"; $description="blinks thinklight on Channel Msg Hilight"; #time for light to be on $onwait=0.1;#fraction of sec to leave on $offwait=0.1;#fraction of sec to have off between blinks $numblink=2; #register with Xchat Xchat::register( $name, $version, $description); #hook channel_msg_hilight Xchat::hook_command("Channel Msg Hilight", blink_thinklight); sub blink_thinklight { for ($i=0; $i<$numblink; $i++) { #turn light on Xchat::command("EXEC echo on>/proc/acpi/ibm/light"); #wait a bit select(undef, undef, undef, $onwait); #shut it off Xchat::command("EXEC echo off>/proc/acpi/ibm/light"); #wait a bit select(undef, undef, undef, $offwait); } return Xchat::EAT_NONE; }