From bf7216f3e55c357d1428f74a19fb34635452842c Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 14 Feb 2018 21:17:38 +0100 Subject: Initial commit: Get text to print in a different color Add a signal for public messages and if the message comes from a certain nick, print the message with special formatting. Currently the format turns the message background to magenta. Discovered custom themes from: https://github.com/irssi/scripts.irssi.org/blob/master/scripts/ignorsula.pl --- dimpid.pl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 dimpid.pl diff --git a/dimpid.pl b/dimpid.pl new file mode 100644 index 0000000..1c04b34 --- /dev/null +++ b/dimpid.pl @@ -0,0 +1,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); + } +}); -- cgit v1.2.3