html/ignorsula.pl


   1 #!/usr/bin/perl
   2 
   3 use strict;
   4 use Irssi;
   5 
   6 use vars qw($VERSION %IRSSI);
   7 
   8 $VERSION = "1.999999999543675475473856-FDIV-final";
   9 %IRSSI = (
  10 	authors		=> 'apic',
  11 	contact		=> 'apic@IRCnet',
  12 	name		=> 'ignorsula',
  13 	description	=> 'script to show ignored message in censored form',
  14 	license		=> 'public domina', #no typo
  15 	url		=> 'http://irssi.apic.name/ignorsula.pl',
  16 );
  17 
  18 Irssi::theme_register(['stopp', "\02\03" . "0,4STOPP\03\02 {msgnick \$0}"]);
  19 
  20 sub handle_msg {
  21 	my ($srv, $msg, $nick, $addr, $dst) = @_;
  22 	if($srv->ignore_check($nick, $addr, $dst, $msg, MSGLEVEL_PUBLIC)) {
  23 	        $srv->printformat($dst, MSGLEVEL_PUBLIC, "stopp", $nick);
  24         }
  25 }
  26 
  27 Irssi::signal_add_first("message public", "handle_msg");
  28 Irssi::signal_add_first("message private", "handle_msg");
  29 Irssi::signal_add_first("ctcp action", "handle_msg");