Mostly direct translation of the Augmented BNF for an IRC message to
a giant regex.
It takes a raw IRC message and returns an array with:
`prefix` // The whole prefix string
`nickname` // The nickname from the prefix
`username` // The username from the prefix
`hostname` // The hostname from the prefix
`servername` // The servername from the prefix
`command` // The command
`params` // The parameters
I'm pretty sure this can be optimised quite a lot, but for now it parses
following the specification and it works ;)
Mostly direct translation of the Augmented BNF for an IRC message to a giant regex. It takes a raw IRC message and returns an array with:
I'm pretty sure this can be optimised quite a lot, but for now it parses following the specification and it works ;)