mirror of
https://github.com/evennia/evennia.git
synced 2026-04-06 07:57:16 +02:00
Fixed an error in @delete that caused ranges of dbrefs not work non-locally. Based on patch supplied in Issue 344 (thanks!).
This commit is contained in:
parent
e8d93dedbe
commit
91281e6bb8
1 changed files with 3 additions and 3 deletions
|
|
@ -538,10 +538,10 @@ class CmdDestroy(MuxCommand):
|
|||
caller.msg("Usage: @destroy[/switches] [obj, obj2, obj3, [dbref-dbref],...]")
|
||||
return ""
|
||||
|
||||
def delobj(objname):
|
||||
def delobj(objname, byref=False):
|
||||
# helper function for deleting a single object
|
||||
string = ""
|
||||
obj = caller.search(objname)
|
||||
obj = caller.search(objname, global_dbref=byref)
|
||||
if not obj:
|
||||
self.caller.msg(" (Objects to destroy must either be local or specified with a unique dbref.)")
|
||||
return ""
|
||||
|
|
@ -575,7 +575,7 @@ class CmdDestroy(MuxCommand):
|
|||
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), True)
|
||||
else:
|
||||
string += delobj(objname)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue