diff options
author | David Phillips <david@sighup.nz> | 2018-09-13 18:45:47 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2018-09-13 18:45:47 +1200 |
commit | 31c97252b6b15fb2fa21f5f830f5c87cc2d61692 (patch) | |
tree | ee94715b8a2ce5bf7e11764308dcddf151d36638 | |
parent | e857c1e04913b4a21871956b3d27e07a730da919 (diff) | |
download | idalius-31c97252b6b15fb2fa21f5f830f5c87cc2d61692.tar.xz |
Jinx: Allow ignored nicks to break streak
-rw-r--r-- | Plugin/Jinx.pm | 17 |
1 files changed, 17 insertions, 0 deletions
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; |