mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 06:57:16 +02:00
Fixed and refactored OOB system and tested with new websocket client
This commit is contained in:
parent
9ba212c264
commit
c60a5fdea1
10 changed files with 209 additions and 128 deletions
|
|
@ -136,14 +136,17 @@ class SessionHandler(object):
|
|||
elif isinstance(oobstruct[1], (tuple, list)):
|
||||
# cmdname, (args,)
|
||||
return (oobstruct[0].lower(), list(oobstruct[1]), {})
|
||||
else:
|
||||
# cmdname, cmdname
|
||||
return ((oobstruct[0].lower(), (), {}), (oobstruct[1].lower(), (), {}))
|
||||
else:
|
||||
# cmdname, (args,), {kwargs}
|
||||
return (oobstruct[0].lower(), list(oobstruct[1]), dict(oobstruct[2]))
|
||||
|
||||
if hasattr(oobstruct, "__iter__"):
|
||||
# differentiate between (cmdname, cmdname),
|
||||
# (cmdname, args, kwargs) and ((cmdname,args,kwargs),
|
||||
# (cmdname,args,kwargs), ...)
|
||||
# (cmdname, (args), {kwargs}) and ((cmdname,(args),{kwargs}),
|
||||
# (cmdname,(args),{kwargs}), ...)
|
||||
|
||||
if oobstruct and isinstance(oobstruct[0], basestring):
|
||||
return (list(_parse(oobstruct)),)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue