From 31c97252b6b15fb2fa21f5f830f5c87cc2d61692 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 13 Sep 2018 18:45:47 +1200 Subject: Jinx: Allow ignored nicks to break streak --- Plugin/Jinx.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Plugin/Jinx.pm b/Plugin/Jinx.pm index 28461b4..6241a64 100644 --- a/Plugin/Jinx.pm +++ b/Plugin/Jinx.pm @@ -53,4 +53,21 @@ sub on_action { $last_response{$channel} = undef; return; } + +# Even ignored nicks should be allowed to break a streak +sub on_message_yes_really_even_from_ignored_nicks { + my ($self, $logger, $me, $who, $where, $raw_what, $what, $irc) = @_; + my $channel = $where->[0]; + + return if $last{$channel} and $last{$channel} eq $what; + + $last{$channel} = undef; + + return; +} + +# Even ignored nicks should be allowed to break a streak +sub on_action_yes_really_even_from_ignored_nicks { + on_message_yes_really_even_from_ignored_nicks(@_); +} 1; -- cgit v1.1