diff options
author | Zoffix Znet <cpan@zoffix.com> | 2015-12-21 08:43:04 -0500 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2015-12-21 08:43:04 -0500 |
commit | c7e225793004a36b8af7d6a58986df31fdb60822 (patch) | |
tree | cc482eb2591821d19d5c366a887261b719050add | |
parent | 512990b82b7129e9438d4a83b0a6a1d26a164285 (diff) |
Add `unhandled` event
-rw-r--r-- | lib/IRC/Client.pm6 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6 index fe6d962..7b1c7e5 100644 --- a/lib/IRC/Client.pm6 +++ b/lib/IRC/Client.pm6 @@ -52,14 +52,19 @@ class IRC::Client:ver<1.002001> { } } + for @!plugs.grep(*.^can: 'all-events') -> $p { + my $res = $p.all-events(self, $e); + next EVENTS unless $res === IRC_NOT_HANDLED; + } + my $cmd = 'irc-' ~ $e<command>.lc; for @!plugs.grep(*.^can: $cmd) -> $p { my $res = $p."$cmd"(self, $e); next EVENTS unless $res === IRC_NOT_HANDLED; } - for @!plugs.grep(*.^can: 'all-events') -> $p { - my $res = $p.all-events(self, $e); + for @!plugs.grep(*.^can: 'unhandled') -> $p { + my $res = $p.unhandled(self, $e); next EVENTS unless $res === IRC_NOT_HANDLED; } } @@ -93,4 +98,4 @@ sub plug-name { $plug ~~ s:g/^ $cur '/' | '.pm6'$//; $plug ~~ s/'/'/::/; return "[$plug] "; -}
\ No newline at end of file +} |