projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't allow abbreviating administrative commands
[mudpy.git]
/
mudpy
/
misc.py
diff --git
a/mudpy/misc.py
b/mudpy/misc.py
index
501d5b4
..
62501d4
100644
(file)
--- a/
mudpy/misc.py
+++ b/
mudpy/misc.py
@@
-1486,8
+1486,10
@@
def find_command(command_name):
command = universe.groups["command"][command_name]
else:
for candidate in sorted(universe.groups["command"]):
command = universe.groups["command"][command_name]
else:
for candidate in sorted(universe.groups["command"]):
- if candidate.startswith(command_name):
- # the command matches the start of a command word
+ if candidate.startswith(command_name) and not universe.groups[
+ "command"][candidate].get("administrative"):
+ # the command matches the start of a command word and is not
+ # restricted to administrators
command = universe.groups["command"][candidate]
break
return command
command = universe.groups["command"][candidate]
break
return command