aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZoffix Znet <cpan@zoffix.com>2016-08-02 08:32:52 -0400
committerZoffix Znet <cpan@zoffix.com>2016-08-02 08:32:52 -0400
commit202393e9558902b7a481cf0e275d19984efc2f30 (patch)
tree66161141106e349ac7311dcebb6091f49317d4a8 /lib
parent4402f2e29b3c8d9a9a4e95d3fab3108a7ef42954 (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
Diffstat (limited to 'lib')
-rw-r--r--lib/IRC/Client/Grammar.pm67
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 }