Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use registered commands for help display of permissions #443

Open
suresttexas00 opened this issue Feb 27, 2017 · 0 comments
Open

Use registered commands for help display of permissions #443

suresttexas00 opened this issue Feb 27, 2017 · 0 comments

Comments

@suresttexas00
Copy link
Collaborator

TODO we should really base permission on the actual command permission, and not a (potentially inconsistent) api.registerHelp() entry!

commands.py

                            # i is each help item, like:
                            # ('/bmlist', 'List bookmark names', None)
                            for i in group:
                                command, args, permission = i[0].split(" ")[0], "", None
                                if i[0].split(" ") > 1:
                                    # if there are args after the command
                                    args = getargsafter(i[0].split(" "), 1)
                                # TODO we should really base permission on the
                                # actual command permission, and not a
                                # (potentially inconsistent) help entry!

                                # will only display is player has permission
                                print(i[2], player.hasPermission(i[2]))
                                if not player.hasPermission(i[2]):

The registerHelp item can be deprecated in a backwards compatible manner since it should properly match it's command anyway!

@suresttexas00 suresttexas00 self-assigned this Feb 27, 2017
@suresttexas00 suresttexas00 added this to the Wrapper 1.1.0 milestone Feb 14, 2018
@suresttexas00 suresttexas00 removed their assignment Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant