Fixed a bug in @dig for handling if no arguments where supplied.

This commit is contained in:
Griatch 2009-05-03 17:10:10 +00:00
parent 05554e290a
commit 9bf3e48def
2 changed files with 31 additions and 19 deletions

View file

@ -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)