Fixed a bug in @dig for handling if no arguments where supplied.
This commit is contained in:
parent
05554e290a
commit
9bf3e48def
2 changed files with 31 additions and 19 deletions
|
|
@ -649,10 +649,15 @@ GLOBAL_CMD_TABLE.add_command("@unlink", cmd_unlink,
|
|||
|
||||
def cmd_dig(command):
|
||||
"""
|
||||
Creates a new room object.
|
||||
Creates a new room object and optionally connects it to
|
||||
where you are.
|
||||
|
||||
Usage:
|
||||
@dig[/switches] roomname [:parent] [=exitthere,exithere]
|
||||
|
||||
switches:
|
||||
teleport - move yourself to the new room
|
||||
|
||||
@dig[/teleport] roomname [:parent] [=exitthere,exithere]
|
||||
|
||||
"""
|
||||
source_object = command.source_object
|
||||
|
||||
|
|
@ -662,6 +667,10 @@ def cmd_dig(command):
|
|||
parent = ''
|
||||
exits = []
|
||||
|
||||
if not args:
|
||||
source_object.emit_to("Usage[/teleport]: @dig roomname [:parent] [=exitthere,exithere]")
|
||||
return
|
||||
|
||||
#handle arguments
|
||||
if ':' in args:
|
||||
roomname, args = args.split(':',1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue