diff options
author | Zoffix Znet <cpan@zoffix.com> | 2015-12-13 19:14:23 -0500 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2015-12-13 19:14:23 -0500 |
commit | 05647bd1f2312cc756f71152252a6349e86f43c5 (patch) | |
tree | 68e2238ed3ec868de1316f21ef1df2d1ea367831 /lib/IRC/Client.pm6 | |
parent | 22e34475c8fe5d6957525962adb4f65d910e46d0 (diff) |
update docs
Diffstat (limited to 'lib/IRC/Client.pm6')
-rw-r--r-- | lib/IRC/Client.pm6 | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6 index c8e6ac4..2623dc2 100644 --- a/lib/IRC/Client.pm6 +++ b/lib/IRC/Client.pm6 @@ -30,37 +30,37 @@ class IRC::Client:ver<1.002001> { react { whenever $!sock.Supply -> $str is copy { $!debug and "[server {DateTime.now}] {$str}".put; - my $messages = parse-irc $str; - MESSAGES: for @$messages -> $message { - $message<pipe> = {}; + my $event = parse-irc $str; + EVENTS: for @$events -> $e { + $e<pipe> = {}; - if ( $message<command> eq 'PRIVMSG' - and $message<params>[0] eq $!nick + if ( $e<command> eq 'PRIVMSG' + and $e<params>[0] eq $!nick ) { for @!plugs.grep(*.^can: 'privmsg-me') -> $p { - my $res = $p.privmsg-me(self, $message); - next MESSAGES unless $res === IRC_NOT_HANDLED; + my $res = $p.privmsg-me(self, $e); + next EVENTS unless $res === IRC_NOT_HANDLED; } } - if ( $message<command> eq 'NOTICE' - and $message<params>[0] eq $!nick + if ( $e<command> eq 'NOTICE' + and $e<params>[0] eq $!nick ) { for @!plugs.grep(*.^can: 'notice-me') -> $p { - my $res = $p.notice-me(self, $message); - next MESSAGES unless $res === IRC_NOT_HANDLED; + my $res = $p.notice-me(self, $e); + next EVENTS unless $res === IRC_NOT_HANDLED; } } - my $cmd = 'irc-' ~ $message<command>.lc; + my $cmd = 'irc-' ~ $e<command>.lc; for @!plugs.grep(*.^can: $cmd) -> $p { - my $res = $p."$cmd"(self, $message); - next MESSAGES unless $res === IRC_NOT_HANDLED; + my $res = $p."$cmd"(self, $e); + next EVENTS unless $res === IRC_NOT_HANDLED; } - for @!plugs.grep(*.^can: 'msg') -> $p { - my $res = $p.msg(self, $message); - next MESSAGES 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; } } } |