github/hubot — pull request #724 by michaelansel (2014-06-27 04:45:31+00:00)
Title: Add Listener options and filtering hooks

Enable the Listener hooks that allow for complex match rules.

Example: only execute commands for users who have performed 2FA with hubot.

```coffeescript
Listener.hooks.push (robot, listener, options, message, cb) ->
if options.auth?.require_2fa
if robot.auth.getUserAuthState(message.message.user)
cb(null, true)
else
message.reply "This command requires two factor authentication. Please run `#{robot.name} auth me` to level up."
cb(null, false)
else
cb(null, true)
```