glenmurphy/route — pull request #2 by alcor (2013-01-16 15:13:35+00:00)
Title: Refine wildcard matching, handle a couple undefined errors.

This should allow proper wildcard matching of arbitrary length. This also allows testing whether a given event mapping exists (which is very helpful for handling multiple matches in voice)

Two questions:

* Do you want to execute EVERY matching event (which means applying this regex test to all incoming commands, BLEH), or just the first match with undefined behavior on multiple. (currently via shift())

* Depending on the above, -hould the regex versions of the wildcard strings be cached? (either in this.eventRegexes, or using string objects for all event names and setting event_name.regex_variant)