From d1125c65dc7bcf83b6c7e68ef05c07c41479ba00 Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 1 Feb 2013 19:27:45 +0100 Subject: [PATCH 1/3] Fixed a formatting error viewing single-string aliases of objects with the examine command. --- src/commands/default/building.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/default/building.py b/src/commands/default/building.py index 5d099f09b3..95b1bf9af6 100644 --- a/src/commands/default/building.py +++ b/src/commands/default/building.py @@ -1649,7 +1649,7 @@ class CmdExamine(ObjManipCommand): else: string = headers["name"] % (obj.name, obj.dbref) if hasattr(obj, "aliases") and obj.aliases: - string += headers["aliases"] % (", ".join(obj.aliases)) + string += headers["aliases"] % (", ".join(utils.make_iter(obj.aliases))) if hasattr(obj, "has_player") and obj.has_player: string += headers["player"] % obj.player.name perms = obj.player.permissions From 8eefc5d9f9c96f78199dc471529080155c91d380 Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 1 Feb 2013 20:00:17 +0100 Subject: [PATCH 2/3] Fixed a bug in @del dbref lookup. --- src/commands/default/building.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/default/building.py b/src/commands/default/building.py index 95b1bf9af6..7ed8872f27 100644 --- a/src/commands/default/building.py +++ b/src/commands/default/building.py @@ -579,7 +579,7 @@ class CmdDestroy(MuxCommand): else: string += delobj(objname) else: - string += delobj(objname) + string += delobj(objname, True) if string: caller.msg(string.strip()) From f734e9511c399ab1db94bbd9e8d82ea02423e69f Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 1 Feb 2013 21:03:03 +0100 Subject: [PATCH 3/3] Handle the case of doing aliases= instead of aliases=[] in create_object - this caused the malformed data to be stored in cache and causing tracebacks in cmdhandler until @reloaded. --- src/commands/default/building.py | 1 + src/objects/models.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/default/building.py b/src/commands/default/building.py index 7ed8872f27..47ef5bf3a4 100644 --- a/src/commands/default/building.py +++ b/src/commands/default/building.py @@ -665,6 +665,7 @@ class CmdDig(ObjManipCommand): if not typeclass: typeclass = settings.BASE_EXIT_TYPECLASS + print typeclass, to_exit["name"], location, to_exit["aliases"],lockstring, new_room, caller new_to_exit = create.create_object(typeclass, to_exit["name"], location, aliases=to_exit["aliases"], locks=lockstring, destination=new_room, report_to=caller) diff --git a/src/objects/models.py b/src/objects/models.py index c3c3c6d245..21bcdda2d0 100644 --- a/src/objects/models.py +++ b/src/objects/models.py @@ -230,7 +230,7 @@ class ObjectDB(TypedObject): for alias in make_iter(aliases): new_alias = Alias(db_key=alias, db_obj=self) new_alias.save() - set_prop_cache(self, "_aliases", aliases) + set_prop_cache(self, "_aliases", make_iter(aliases)) #@aliases.deleter def __aliases_del(self): "Deleter. Allows for del self.aliases"