From 91281e6bb8d71554fa3fe61f1d716f40fcfa3134 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 20 Jan 2013 17:23:31 +0100 Subject: [PATCH] Fixed an error in @delete that caused ranges of dbrefs not work non-locally. Based on patch supplied in Issue 344 (thanks!). --- src/commands/default/building.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/default/building.py b/src/commands/default/building.py index 8f5b27ef4..5d099f09b 100644 --- a/src/commands/default/building.py +++ b/src/commands/default/building.py @@ -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: