projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Streamline can_run access control method
[mudpy.git]
/
mudpy
/
misc.py
diff --git
a/mudpy/misc.py
b/mudpy/misc.py
index
044614f
..
fd4e0ac
100644
(file)
--- 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():
# has to be in the commands group
if command not in self.universe.groups["command"].values():
- re
sult = False
+ re
turn(False)
# avatars of administrators can run any command
# avatars of administrators can run any command
-
el
if self.owner and self.owner.account.get("administrator"):
- re
sult = True
+ if self.owner and self.owner.account.get("administrator"):
+ re
turn(True)
# everyone can run non-administrative commands
# everyone can run non-administrative commands
-
el
if not command.get("administrative"):
- re
sult = True
+ if not command.get("administrative"):
+ re
turn(True)
# otherwise the command cannot be run by this actor
# 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."""
def update_location(self):
"""Make sure the location's contents contain this element."""