Advertisement
mendigo

Untitled

Aug 16th, 2011
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. use strict;
  2. use vars qw($VERSION %IRSSI);
  3.  
  4. use Irssi;
  5. $VERSION = '1.1';
  6. %IRSSI = (
  7. authors => 'Rodrigo Oliveira Lopes',
  8. contact => '[email protected]',
  9. name => 'brkNotify.pl',
  10. description => 'Notifica os eventos do irssi.',
  11. url => 'http://www.irssi.com/',
  12. license => 'GNU General Public License',
  13. changed => '$Date: 2011-08-14 01:57:00 +0100 (Sat, 14 Agu 2011) $'
  14. );
  15.  
  16.  
  17. #--------------------------------------------------------------------
  18. # Mensagem privada.
  19. #--------------------------------------------------------------------
  20.  
  21. sub priv_msg {
  22. my ($server,$msg,$nick,$address,$target) = @_;
  23. system ("notify-send -i ~/.irssi/irssi_logo.png -t 300000 -- '".$nick."' '".$msg."'");
  24. }
  25.  
  26. #--------------------------------------------------------------------
  27. # Mensagens no canal.
  28. #--------------------------------------------------------------------
  29.  
  30. sub hilight {
  31. my ($dest, $text, $stripped) = @_;
  32. if ($dest->{level} & MSGLEVEL_HILIGHT) {
  33. system ("notify-send -i ~/.irssi/irssi_logo.png -t 300000 -- '".$dest->{target}."'");
  34. }
  35. }
  36.  
  37. #--------------------------------------------------------------------
  38. # Irssi::signal_add_last / Irssi::command_bind
  39. #--------------------------------------------------------------------
  40.  
  41. Irssi::signal_add_last("message private", "priv_msg");
  42. Irssi::signal_add_last("print text", "hilight");
  43.  
  44. #- fim
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement