logo

scripts

A bunch of scripts, some to be moved to their own repository git clone https://hacktivis.me/git/scripts.git

notify-send.pl (703B)


  1. use Irssi;
  2. use vars qw($VERSION %IRSSI);
  3. $VERSION = '0.0.3';
  4. %IRSSI = (
  5. authors => 'Chrelad',
  6. name => 'notify',
  7. description => 'Display a pop-up alert for different events.',
  8. url => 'http://google.com',
  9. license => 'GNU General Public License',
  10. );
  11. $_nick = Client->{nick};
  12. sub pub_msg {
  13. my ($server, $msg, $nick, $address, $target) = @_;
  14. if ($msg =~ $_nick) {
  15. `notify-send -a irssi -t 8000 "${target}: ${nick}" "${msg}"`;
  16. }
  17. }
  18. sub priv_msg {
  19. my ($server, $msg, $nick, $address) = @_;
  20. `notify-send -a irssi -t 8000 ${nick} ${msg}`;
  21. }
  22. Irssi::signal_add_last("message public", "pub_msg");
  23. Irssi::signal_add_last("message private", "priv_msg");