use strict; use vars qw($VERSION %IRSSI); use Irssi; $VERSION = '0.0.3'; %IRSSI = ( authors => 'Chrelad', contact => 'blah@blah.blah', name => 'notify', description => 'Display a pop-up alert for different events.', url => 'http://google.com', license => 'GNU General Public License', changed => '$Date: 2007-02-07 12:00:00 +0100 (Thu, 7 Feb 2008) $' ); #-------------------------------------------------------------------- # Created by Chrelad # Feb 7, 2008 #-------------------------------------------------------------------- #-------------------------------------------------------------------- # The notify function for public message #-------------------------------------------------------------------- sub pub_msg { my ($server,$msg,$nick,$address,$target) = @_; `notify-send -t 8000 "${target} : ${nick}" "${msg}"`; } #-------------------------------------------------------------------- # Irssi::signal_add_last / Irssi::command_bind #-------------------------------------------------------------------- Irssi::signal_add_last("message public", "pub_msg"); #- end
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Using notify-send with IRSSI (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Play sound for certain event... in irc irssi sound sounds audible audio mp3 wav ogg wmv chat notify notification alert alerts
» Javascript Popup Function in javascript popup
» Attach Events in javascript base prototype event
» Execute Event in javascript prototype utility event
» Function.prototype.toEvent (... in javascript prototype event
» Somewhat ridiculous XML pars... in php image xml irc
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails