From c7e225793004a36b8af7d6a58986df31fdb60822 Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Mon, 21 Dec 2015 08:43:04 -0500 Subject: Add `unhandled` event --- lib/IRC/Client.pm6 | 11 ++++++++--- 1 file 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.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 +} -- cgit v1.1