-
Notifications
You must be signed in to change notification settings - Fork 4
Working prototype #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Working prototype #15
Conversation
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 ;)
Needed to explicitly set the minimum version we need of the phpunit/php-token-stream package. Probably somewhere in the phpunit dependency tree it have specified a minimum version of that package that doesn't support PHP 7.
| } | ||
|
|
||
| ob_start(); | ||
| var_dump($message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh-oh here be dragons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is there so we're able to see what the incoming messages look like.
It's written out in the terminal where you're running the bot ;)
|
👍 |
No description provided.