Add pretreatment hooks

This commit is contained in:
Némunaire 2012-08-23 01:54:39 +02:00
parent 68c88fc864
commit 926abd8806
3 changed files with 14 additions and 9 deletions

View file

@ -219,6 +219,7 @@ class Message:
print ("Can't reparse message")
def parsemsg (self, hooks):
hooks.treat_pre(self)
#Treat all messages starting with 'nemubot:' as distinct commands
if self.content.find("%s:"%self.srv.nick) == 0:
#Remove the bot name