diff options
author | Zoffix Znet <cpan@zoffix.com> | 2016-10-15 14:45:23 -0400 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2016-10-15 14:45:23 -0400 |
commit | 4411e6f5498beec81c95eb9810c37cd7ab56a0db (patch) | |
tree | ac86576b4d0b80e3a7df4faa1507a55fb5b88fa2 /lib/IRC/Client.pm6 | |
parent | acd52a7219f7518355fe8e1216ea5faf3ff18bf7 (diff) |
Fix numeric events being unsubscrabable due to incorrect identifiers
Fixes #31
Diffstat (limited to 'lib/IRC/Client.pm6')
-rw-r--r-- | lib/IRC/Client.pm6 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6 index 3879ac9..e5696b4 100644 --- a/lib/IRC/Client.pm6 +++ b/lib/IRC/Client.pm6 @@ -267,7 +267,10 @@ method !handle-event ($e) { $s.is-connected = True; take 'irc-connected'; } - take 'irc-' ~ $e.command, $event-name; + + # prefix numerics with 'n' as irc-\d+ isn't a valid identifier + take 'irc-' ~ ('n' if $e ~~ IRC::Client::Message::Numeric) + ~ $e.command, $event-name; } default { take $event-name } } |