- def bind(self, word, handler): pass
- def addbind(self, word, handler): pass
- def rmbind(self, word, handler): pass
- def getbind(self, word, handler): pass
-
-cfg = config.Config('bot.config')
-main = Erebus()
+ def hook(self, word, handler):
+ print "hooked %r to %r" % (word, handler)
+ self.msghandlers[word] = handler
+ def unhook(self, word):
+ del self.msghandlers[word]
+ def hashook(self, word):
+ return word in self.msghandlers
+ def gethook(self, word):
+ return self.msghandlers[word]