X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fmisc.py;fp=mudpy%2Fmisc.py;h=fd4e0ac1c9185453513f00959d731484295394bf;hp=044614fb2aaec370376c2189514bd6498cbe9714;hb=c7ee3d6c896f1534d8da46e973700a26b9feb706;hpb=86687f01f1ee31acb004ec91ba6d90059b89d93e diff --git a/mudpy/misc.py b/mudpy/misc.py index 044614f..fd4e0ac 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -189,22 +189,18 @@ class Element: # has to be in the commands group if command not in self.universe.groups["command"].values(): - result = False + return(False) # avatars of administrators can run any command - elif self.owner and self.owner.account.get("administrator"): - result = True + if self.owner and self.owner.account.get("administrator"): + return(True) # everyone can run non-administrative commands - elif not command.get("administrative"): - result = True + if not command.get("administrative"): + return(True) # otherwise the command cannot be run by this actor - else: - result = False - - # pass back the result - return result + return(False) def update_location(self): """Make sure the location's contents contain this element."""