aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Jinx.pm
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-09-13 18:45:47 +1200
committerDavid Phillips <david@sighup.nz>2018-09-13 18:45:47 +1200
commit31c97252b6b15fb2fa21f5f830f5c87cc2d61692 (patch)
treeee94715b8a2ce5bf7e11764308dcddf151d36638 /Plugin/Jinx.pm
parente857c1e04913b4a21871956b3d27e07a730da919 (diff)
downloadidalius-31c97252b6b15fb2fa21f5f830f5c87cc2d61692.tar.xz
Jinx: Allow ignored nicks to break streak
Diffstat (limited to 'Plugin/Jinx.pm')
-rw-r--r--Plugin/Jinx.pm17
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;