diff options
author | Zoffix Znet <cpan@zoffix.com> | 2016-08-02 08:32:52 -0400 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2016-08-02 08:32:52 -0400 |
commit | 202393e9558902b7a481cf0e275d19984efc2f30 (patch) | |
tree | 66161141106e349ac7311dcebb6091f49317d4a8 | |
parent | 4402f2e29b3c8d9a9a4e95d3fab3108a7ef42954 (diff) |
Make nick grammar looser
Fixes #19
the RFC grammar states nicks have to start with a letter,
however, modern server support and nick use disagrees with that
and nicks can start with special chars too
-rw-r--r-- | lib/IRC/Client/Grammar.pm6 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/IRC/Client/Grammar.pm6 b/lib/IRC/Client/Grammar.pm6 index feec9fd..a80b79f 100644 --- a/lib/IRC/Client/Grammar.pm6 +++ b/lib/IRC/Client/Grammar.pm6 @@ -8,7 +8,12 @@ token message { [':' <prefix> <SPACE> ]? <command> <params> \n } <before <SPACE>> } token servername { <host> } - token nick { <letter> [ <letter> | <number> | <special> ]* } + token nick { + # the RFC grammar states nicks have to start with a letter, + # however, modern server support and nick use disagrees with that + # and nicks can start with special chars too + [<letter> | <special>] [ <letter> | <number> | <special> ]* + } token user { <-[\ \x[0]\r\n]>+? <before [<SPACE> | '@']>} token host { <-[\s!@]>+ } token command { <letter>+ | <number>**3 } |