killswitch/dunn — pull request #36 by eggsby (2013-02-07 05:47:04+00:00)
Title: Add regexp handler to addMessageHandler hook

This allows for generic regexp based matching, further use would forward capture groups and forward captures to plugin.

It does this by registering the handler under the unique key by trigger + a string representation of the function (idempotent and unique!);

Usage is simply:

irc.addMessageHandler(/\bSomeRegex\b/, callback);

Cheers!