From 4411e6f5498beec81c95eb9810c37cd7ab56a0db Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Sat, 15 Oct 2016 14:45:23 -0400 Subject: Fix numeric events being unsubscrabable due to incorrect identifiers Fixes #31 --- lib/IRC/Client.pm6 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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 } } -- cgit v1.1