diff options
author | Teddy Wing | 2018-02-14 21:17:38 +0100 |
---|---|---|
committer | Teddy Wing | 2018-02-14 21:55:47 +0100 |
commit | bf7216f3e55c357d1428f74a19fb34635452842c (patch) | |
tree | 9243404b2788eb9852fe39ad190fadd858422331 | |
download | irssi-dimpid-bf7216f3e55c357d1428f74a19fb34635452842c.tar.bz2 |
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
-rw-r--r-- | dimpid.pl | 27 |
1 files changed, 27 insertions, 0 deletions
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); + } +}); |