If a command is flagged as administrative, don't match substring
abbreviations for it. For example, an admin entering "h" should get
the help summary, not halt the engine.
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