aboutsummaryrefslogtreecommitdiffstats
path: root/dimpid.pl
blob: 1c04b34b5f11f77c9f3c0fb9744fd993d9834971 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use strict;

use Irssi;

our $VERSION = '1.00';
our %IRSSI = {
	authors     => 'Teddy Wing',
	contact     => 'irssi@teddywing.com',
	name        => 'Dimpid',
	description => 'Dim messages from certain nicks',
	license     => 'GPL',
};


use Data::Dumper;

Irssi::theme_register(['dimpid', '%5$0%n']);

Irssi::signal_add('message public', sub {
	my ($server, $text, $nick, $address, $target) = @_;

	Irssi::print(Dumper($target), MSGLEVEL_CLIENTCRAP);

	if ($nick eq 'test-3kj469y5h') {
		$server->printformat($target, MSGLEVEL_PUBLIC, 'dimpid', $text);
	}
});