Move from RegEx
The commands to the bot should be changed from using RegEx to something better.
What's better than RegEx??? My first child's middle name is RegEx.
That's, uh, interesting... The "something better" clurect refers to is basically a template style. Initially scripts would listen for matches to a given regex (matches against the raw IRC protocol). Over the course of developing the scripts, I made tweaks to the regex I wrote, and each time I made such a tweak, I'd have to go back through all the existing scripts and fix any other instances of that. This indicates reuse that should be refactored to one location, and thus the motivation for this change.
It's already in the codebase in a basic form, just needs to be enhanced and most of the scripts need to be fixed to use it. And there are still some specialized cases which I think are sufficient for raw regex (KISS).
Here is the part of the listener code that makes the regex on the fly from the given string: https://github.com/Ricket/nodebot/blob/master/main.js#L97
Here is a script which should be changed to use this but hasn't yet: https://github.com/Ricket/nodebot/blob/master/scripts/help.js
Here's a script which is using it: https://github.com/Ricket/nodebot/blob/master/scripts/excuse.js
And hey, maybe this isn't even the right approach. Maybe the listen function should always take a regex, and then there should be some sort of "regex factory" for the scripts that constructs a regex. That would probably be more decoupled and flexible, and still solve the problem at hand.
I know this is an old issue, however I suggest using this package:
https://www.npmjs.org/package/irc-message
for parsing of commands. I'm considering integrating it with my private fork from this (might do a pull request if I like how I did it)