aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZoffix Znet <cpan@zoffix.com>2015-12-21 09:10:03 -0500
committerZoffix Znet <cpan@zoffix.com>2015-12-21 09:10:03 -0500
commitc97eb34b64788602713fcc77d3c18ab17b629318 (patch)
treea701f958606357939f1bd4be16d80384fffd72d0 /lib
parentc7e225793004a36b8af7d6a58986df31fdb60822 (diff)
Some docs
Diffstat (limited to 'lib')
-rw-r--r--lib/IRC/Client.pm616
-rw-r--r--lib/IRC/Client/Plugin/Debugger.pm62
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6
index 7b1c7e5..c781ef1 100644
--- a/lib/IRC/Client.pm6
+++ b/lib/IRC/Client.pm6
@@ -34,10 +34,15 @@ class IRC::Client:ver<1.002001> {
EVENTS: for @$events -> $e {
$e<pipe> = {};
+ for @!plugs.grep(*.^can: 'irc-all-events') -> $p {
+ my $res = $p.all-events(self, $e);
+ next EVENTS unless $res === IRC_NOT_HANDLED;
+ }
+
if ( $e<command> eq 'PRIVMSG'
and $e<params>[0] eq $!nick
) {
- for @!plugs.grep(*.^can: 'privmsg-me') -> $p {
+ for @!plugs.grep(*.^can: 'irc-privmsg-me') -> $p {
my $res = $p.privmsg-me(self, $e);
next EVENTS unless $res === IRC_NOT_HANDLED;
}
@@ -46,24 +51,19 @@ class IRC::Client:ver<1.002001> {
if ( $e<command> eq 'NOTICE'
and $e<params>[0] eq $!nick
) {
- for @!plugs.grep(*.^can: 'notice-me') -> $p {
+ for @!plugs.grep(*.^can: 'irc-notice-me') -> $p {
my $res = $p.notice-me(self, $e);
next EVENTS unless $res === IRC_NOT_HANDLED;
}
}
- 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: 'unhandled') -> $p {
+ for @!plugs.grep(*.^can: 'irc-unhandled') -> $p {
my $res = $p.unhandled(self, $e);
next EVENTS unless $res === IRC_NOT_HANDLED;
}
diff --git a/lib/IRC/Client/Plugin/Debugger.pm6 b/lib/IRC/Client/Plugin/Debugger.pm6
index 17cf697..131bb35 100644
--- a/lib/IRC/Client/Plugin/Debugger.pm6
+++ b/lib/IRC/Client/Plugin/Debugger.pm6
@@ -2,7 +2,7 @@ use Data::Dump;
use IRC::Client::Plugin;
unit class IRC::Client::Plugin::Debugger:ver<1.002001> is IRC::Client::Plugin;
-method all-events ($irc, $e) {
+method irc-all-events ($irc, $e) {
say Dump $e, :indent(4);
return IRC_NOT_HANDLED;
}