def __init__(self, bot, what='praise', path='praises'): Plugin.__init__(self, bot) self.what = what self.path = path setattr(self, 'on_bang_' + what, self._on_praise) setattr(self, 'on_bang_new' + what, self._on_newpraise)
def on_privmsg(self, message): what = message.says if what.startswith('!?'): what = what[2:].strip() self.on_lookup(message, what) return True elif what.startswith('!!'): self.on_define(message, what) return True return Plugin.on_privmsg(self, message)
def __init__(self, bot): Plugin.__init__(self, bot) self.channels = {}