diff options
author | Teddy Wing | 2018-02-14 22:27:50 +0100 |
---|---|---|
committer | Teddy Wing | 2018-02-14 22:27:50 +0100 |
commit | a249f48a82e1a16d674582598fc458a77992a7cf (patch) | |
tree | 1c8f695a76860d3e19f495757e67c1d89de2eda7 /dimpid.pl | |
parent | 74e886839e669b29b540113a3ace6ea779acbda3 (diff) | |
download | irssi-dimpid-a249f48a82e1a16d674582598fc458a77992a7cf.tar.bz2 |
Add setting for list of nicks
Instead of using a hard-coded nick, add a setting where any number of
nicks can be defined. The message text for these nicks will be changed
to grey.
Diffstat (limited to 'dimpid.pl')
-rw-r--r-- | dimpid.pl | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -18,7 +18,9 @@ use constant GREY => '14'; Irssi::signal_add('message public', sub { my ($server, $text, $nick, @rest) = @_; - if ($nick eq 'test-3kj469y5h') { + my @nicks = split(' ', Irssi::settings_get_str('dimpid_nicks')); + + if (grep($_ eq $nick, @nicks)) { Irssi::signal_continue( $server, ESCAPE . GREY . $text . ESCAPE, @@ -27,3 +29,6 @@ Irssi::signal_add('message public', sub { ); } }); + + +Irssi::settings_add_str('dimpid', 'dimpid_nicks', ''); |