mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 07:16:31 +01: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.
|
||||
|
||||
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
|
||||
accessible to all.
|
||||
|
||||
"""
|
||||
if hasattr(cmd_or_topic, "auto_help") and not cmd_or_topic.auto_help:
|
||||
return False
|
||||
|
||||
has_view = (
|
||||
"view:" in cmd_or_topic.locks
|
||||
if inherits_from(cmd_or_topic, "evennia.commands.command.Command")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue