aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZoffix Znet <cpan@zoffix.com>2015-12-21 08:43:04 -0500
committerZoffix Znet <cpan@zoffix.com>2015-12-21 08:43:04 -0500
commitc7e225793004a36b8af7d6a58986df31fdb60822 (patch)
treecc482eb2591821d19d5c366a887261b719050add /lib
parent512990b82b7129e9438d4a83b0a6a1d26a164285 (diff)
Add `unhandled` event
Diffstat (limited to 'lib')
-rw-r--r--lib/IRC/Client.pm611
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
+}