Best irssi script EVER

Updated: Download the newest version (2.5.urmom) here.

After adding yet another user to my ignore list in irssi I realized that the channels started getting a little too quiet. Instead of silently ignoring public messages from ignored users I decided to redact their messages instead. The code for redacted_ignore.pl is:

#!/usr/bin/perl

use strict;
use Irssi;

use vars qw($VERSION %IRSSI);

$VERSION = "0.000000001";
%IRSSI = (
authors => 'Blaine Fleming',
contact => 'blaine@selfishman.net',
name => 'redacted_ignore',
description => 'script to redact public messages from ignored users',
license => 'GPL',
url => 'http://selfishman.net',
changed => '2009-11-03',
changes => 'FIRST POST!'
);

Irssi::theme_register(['redact', "{msgnick \$0}" . ""]);

sub do_urmom_in_public {
my ($srv, $msg, $nick, $addr, $tgt) = @_;
$srv->printformat($tgt, MSGLEVEL_PUBLIC, "redact", $nick)
if $srv->ignore_check($nick, $addr, $tgt, $msg, MSGLEVEL_PUBLIC);
}

Irssi::print("redact public messages from ignored users") ;

Irssi::signal_add_first("message public", "do_urmom_in_public") ;

This script is also available for download from here.

To use it just ignore users normally using '/ignore user'.


Leave a Reply