mirror of
https://github.com/evennia/evennia.git
synced 2026-04-03 22:47:16 +02:00
Added "raw_string" (unformatted, no stripping) as a property on commands, inspired by work by user Kelketek.
This commit is contained in:
parent
f0f240b7ce
commit
ca0920e635
2 changed files with 5 additions and 3 deletions
|
|
@ -180,7 +180,7 @@ def cmdhandler(caller, raw_string, testing=False):
|
|||
if not cmdset:
|
||||
# this is bad and shouldn't happen.
|
||||
raise NoCmdSets
|
||||
|
||||
unformatted_raw_string = raw_string
|
||||
raw_string = raw_string.strip()
|
||||
if not raw_string:
|
||||
# Empty input. Test for system command instead.
|
||||
|
|
@ -248,6 +248,7 @@ def cmdhandler(caller, raw_string, testing=False):
|
|||
cmd.cmdstring = cmdname
|
||||
cmd.args = args
|
||||
cmd.cmdset = cmdset
|
||||
cmd.raw_string = unformatted_raw_string
|
||||
|
||||
if hasattr(cmd, 'obj') and hasattr(cmd.obj, 'scripts'):
|
||||
# cmd.obj are automatically made available.
|
||||
|
|
@ -289,6 +290,7 @@ def cmdhandler(caller, raw_string, testing=False):
|
|||
syscmd.cmdstring = syscmd.key
|
||||
syscmd.args = sysarg
|
||||
syscmd.cmdset = cmdset
|
||||
syscmd.raw_string = unformatted_raw_string
|
||||
|
||||
if hasattr(syscmd, 'obj') and hasattr(syscmd.obj, 'scripts'):
|
||||
# cmd.obj is automatically made available.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue