Advertisement
docker

irssi notify script

Nov 6th, 2011
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.19 KB | None | 0 0
  1. use strict;
  2. use vars qw($VERSION %IRSSI);
  3.  
  4. use Irssi;
  5. $VERSION = '0.0.3';
  6. %IRSSI = (
  7.         authors     => 'Chrelad',
  8.         contact     => 'blah@blah.blah',
  9.         name        => 'notify',
  10.         description => 'Display a pop-up alert for different events.',
  11.         url         => 'http://google.com',
  12.         license     => 'GNU General Public License',
  13.         changed     => '$Date: 2007-02-07 12:00:00 +0100 (Thu, 7 Feb 2008) $'
  14. );
  15.  
  16. #--------------------------------------------------------------------
  17. # Created by Chrelad
  18. # Feb 7, 2008
  19. #--------------------------------------------------------------------
  20.  
  21. #--------------------------------------------------------------------
  22. # The notify function for public message
  23. #--------------------------------------------------------------------
  24.  
  25. sub pub_msg {
  26.         my ($server,$msg,$nick,$address,$target) = @_;
  27.         `notify-send -t 8000 "${target} : ${nick}" "${msg}"`;
  28. }
  29.  
  30. #--------------------------------------------------------------------
  31. # Irssi::signal_add_last / Irssi::command_bind
  32. #--------------------------------------------------------------------
  33.  
  34. Irssi::signal_add_last("message public", "pub_msg");
  35. #- end
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement