gbin/err — pull request #250 by zoni (2014-03-30 18:44:22+00:00)
Title: Regex-based bot commands

This implements bot commands that get triggered via a regex, as opposed to a fixed string, using a new decorator, `re_botcmd`. These look like this:

```python
@re_botcmd(pattern=r'^some command$')
def some_command(self, msg, match):
pass
```

The implementation is written so that a prefix can be optionally required or omitted (specified as a parameter to `re_botcmd`) and all the checks that get applied to regular commands get applied to these regex-based commands as well. This means options like `ACCESS_CONTROLS` and `DIVERT_TO_PRIVATE` work out of the box with these new commands as well.

I have also added extensive tests covering the existing and new use cases so that refactoring this into a cleaner implementation can be safely done in the future.

The only thing that is not yet implemented is having these new commands show up in `!help` output. I didn't implement this yet because I plan to clean up the help output in the future, so I didn't want to do any double work yet at this time.

Further documentation for these commands will also be coming in the near future, although I already overhauled the docstrings on the new and old decorators to provide more documentation.