mirror of
https://github.com/evennia/evennia.git
synced 2026-03-25 09:16:32 +01:00
Add an extra_vars element to the command table that allows extra variables to be passed through the command table. Also added DOING ala MUX.
This commit is contained in:
parent
f2d4b3aba4
commit
7280eaf803
3 changed files with 15 additions and 3 deletions
|
|
@ -38,6 +38,8 @@ class Command(object):
|
|||
command_argument = None
|
||||
# A reference to the command function looked up in a command table.
|
||||
command_function = None
|
||||
# An optional dictionary that is passed through the command table as extra_vars.
|
||||
extra_vars = None
|
||||
|
||||
def parse_command_switches(self):
|
||||
"""
|
||||
|
|
@ -243,6 +245,7 @@ def command_table_lookup(command, command_table, eval_perms=True):
|
|||
raise ExitCommandHandler
|
||||
# If flow reaches this point, user has perms and command is ready.
|
||||
command.command_function = cmdtuple[0]
|
||||
command.extra_vars = cmdtuple[2]
|
||||
|
||||
def handle(command):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue