Fixed bug in @batchcommand (Resolves Issue 287). Also updated @dig to again handle deleting ranges of dbrefs (with or without # in front).
This commit is contained in:
parent
86a44ab84d
commit
4dff822764
5 changed files with 14 additions and 12 deletions
|
|
@ -392,7 +392,7 @@ class CmdBatchCode(MuxCommand):
|
|||
# un in-process (will block)
|
||||
for inum in range(len(codes)):
|
||||
# loop through the batch file
|
||||
if not batch_cmd_exec(caller):
|
||||
if not batch_code_exec(caller):
|
||||
return
|
||||
step_pointer(caller, 1)
|
||||
# clean out the safety cmdset and clean out all other temporary attrs.
|
||||
|
|
|
|||
|
|
@ -545,7 +545,7 @@ class CmdDestroy(MuxCommand):
|
|||
if not obj:
|
||||
self.caller.msg(" (Objects to destroy must either be local or specified with a unique dbref.)")
|
||||
return ""
|
||||
if not "override" in self.switches and obj.dbid == int(settings.CHARACTER_DEFAULT_HOME):
|
||||
if not "override" in self.switches and obj.dbid == int(settings.CHARACTER_DEFAULT_HOME.lstrip("#")):
|
||||
return "\nYou are trying to delete CHARACTER_DEFAULT_HOME. If you want to do this, use the /override switch."
|
||||
objname = obj.name
|
||||
if not obj.access(caller, 'delete'):
|
||||
|
|
@ -572,10 +572,10 @@ class CmdDestroy(MuxCommand):
|
|||
for objname in self.lhslist:
|
||||
if '-' in objname:
|
||||
# might be a range of dbrefs
|
||||
dmin, dmax = [utils.dbref(part) for part in objname.split('-', 1)]
|
||||
dmin, dmax = [utils.dbref(part, reqhash=False) for part in objname.split('-', 1)]
|
||||
if dmin and dmax:
|
||||
for dbref in range(int(dmin),int(dmax+1)):
|
||||
string += delobj(str(dbref))
|
||||
string += delobj("#" + str(dbref))
|
||||
else:
|
||||
string += delobj(objname)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue