mirror of
https://github.com/evennia/evennia.git
synced 2026-04-18 06:09:06 +02:00
Properly remove cmds with auto_help=False from index. Resolve #2452.
This commit is contained in:
parent
fb9d89eeaa
commit
2ba0f42628
1 changed files with 5 additions and 1 deletions
|
|
@ -334,11 +334,15 @@ class CmdHelp(COMMAND_DEFAULT_CLASS):
|
||||||
bool: If command should be listed or not.
|
bool: If command should be listed or not.
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
By default, the 'view' lock will be checked, and if no such lock is defined, the 'read'
|
The `.auto_help` propery is checked for commands. For all help entries,
|
||||||
|
the 'view' lock will be checked, and if no such lock is defined, the 'read'
|
||||||
lock will be used. If neither lock is defined, the help entry is assumed to be
|
lock will be used. If neither lock is defined, the help entry is assumed to be
|
||||||
accessible to all.
|
accessible to all.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
if hasattr(cmd_or_topic, "auto_help") and not cmd_or_topic.auto_help:
|
||||||
|
return False
|
||||||
|
|
||||||
has_view = (
|
has_view = (
|
||||||
"view:" in cmd_or_topic.locks
|
"view:" in cmd_or_topic.locks
|
||||||
if inherits_from(cmd_or_topic, "evennia.commands.command.Command")
|
if inherits_from(cmd_or_topic, "evennia.commands.command.Command")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue