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
|
|
@ -50,12 +50,12 @@ def connect(data, toks, context, prompt):
|
|||
if len(toks) > 1:
|
||||
for s in toks[1:]:
|
||||
if s in context.servers:
|
||||
context.servers[s].launch(context)
|
||||
context.servers[s].launch(context.receive_message)
|
||||
else:
|
||||
print ("connect: server `%s' not found." % s)
|
||||
|
||||
elif prompt.selectedServer is not None:
|
||||
prompt.selectedServer.launch(context)
|
||||
prompt.selectedServer.launch(context.receive_message)
|
||||
else:
|
||||
print (" Please SELECT a server or give its name in argument.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue