aboutsummaryrefslogtreecommitdiffstats
path: root/dimpid.pl
diff options
context:
space:
mode:
authorTeddy Wing2018-02-14 22:27:50 +0100
committerTeddy Wing2018-02-14 22:27:50 +0100
commita249f48a82e1a16d674582598fc458a77992a7cf (patch)
tree1c8f695a76860d3e19f495757e67c1d89de2eda7 /dimpid.pl
parent74e886839e669b29b540113a3ace6ea779acbda3 (diff)
downloadirssi-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.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/dimpid.pl b/dimpid.pl
index 78db3f6..56af8bf 100644
--- a/dimpid.pl
+++ b/dimpid.pl
@@ -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', '');