us
markwalling.org
If thou seeketh the meaning of life,
thou shalt not findeth here.

The best irssi script ever!

Yesterday, Blaine Fleming wrote the best irssi script ever. Instead of discarding PUBLIC messages from ignored nicks, it replaces their content with <redacted>. It makes busy channels with lots of /ignores very interesting (let the creativity fly!).

Get it here, or see the gist below.

#!/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}" . "<redacted>"]);

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");

Enjoy!

Posted 04 Nov 2009

Site info