Introducing a new nemubot architecture for servers and messages treatment: messages have no more context or server

This commit is contained in:
Némunaire 2012-11-02 12:10:37 +01:00
commit a62940380e
12 changed files with 471 additions and 327 deletions

View file

@ -217,6 +217,9 @@ class NetworkBot:
elif (cmd == b'HOOK' or cmd == b'"HOOK"') and len(args) > 0: # Action requested
self.context.receive_message(self, args[0].encode(), True, tag)
elif (cmd == b'NOMORE' or cmd == b'"NOMORE"') and len(args) > 0: # Reset !more feature
if args[0] in self.srv.moremessages:
del self.srv.moremessages[args[0]]
def exec_hook(self, msg):
self.send_cmd(["HOOK", msg.raw])