diff --git a/evennia/commands/default/building.py b/evennia/commands/default/building.py index fb4cba7818..af2bcef575 100644 --- a/evennia/commands/default/building.py +++ b/evennia/commands/default/building.py @@ -2597,6 +2597,7 @@ class CmdSpawn(COMMAND_DEFAULT_CLASS): self.caller.msg(string) return + if isinstance(prototype, basestring): # A prototype key keystr = prototype @@ -2605,7 +2606,13 @@ class CmdSpawn(COMMAND_DEFAULT_CLASS): string = "No prototype named '%s'." % keystr self.caller.msg(string + _show_prototypes(prototypes)) return - elif not isinstance(prototype, dict): + elif isinstance(prototype, dict): + # we got the prototype on the command line. We must make sure to not allow + # the 'exec' key unless we are immortals or higher. + if "exec" in prototype and not self.caller.check_permstring("Immortals"): + self.caller.msg("Spawn aborted: You don't have access to use the 'exec' prototype key.") + return + else: self.caller.msg("The prototype must be a prototype key or a Python dictionary.") return diff --git a/evennia/typeclasses/models.py b/evennia/typeclasses/models.py index 70fe15f5c2..c9b14bb75b 100644 --- a/evennia/typeclasses/models.py +++ b/evennia/typeclasses/models.py @@ -525,10 +525,10 @@ class TypedObject(SharedMemoryModel): """ if hasattr(self, "player"): - if self.player and self.player.is_superuser: + if self.player and self.player.is_superuser and not self.player.attributes.get("_quell"): return True else: - if self.is_superuser: + if self.is_superuser and not self.attributes.get("_quell"): return True if not permstring: