def regex(self, hook, **kwargs):
        plugin = {}

        def wrapper(func):
            plugin['funcs'] = [func]
            self.plugin._update_plugin(plugin, 'REGEX')
            return func

        plugin['hook'] = hook
        plugin.update(kwargs)
        return wrapper
Takes a regular expression as a hook.
dataset/ETHPy150Open maxcountryman/irctk/irctk/bot.py/Bot.regex