Introducing a new nemubot architecture for servers and messages treatment: messages have no more context or server
This commit is contained in:
parent
f00dfc82f7
commit
a62940380e
12 changed files with 471 additions and 327 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue