/help show only available commands #51
Labels
No labels
bug
duplicate
enhancement
help wanted
in progress...
information
invalid
not enough info
priority high
priority low
priority normal
question
request
research
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Techwizz/pvpgn-server#51
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Commands restricted by CGs shouldn't be shown using the
/help
command unless the user has access to themGood idea.
Agreed, nice idea!
I just see — this functionality was already done.
Unwanted commands are defined in
command_groups.conf
for group 1 (normal user can be an operator on a new created channel):1 /kick /ban /unban /op /deop /aop /voice /devoice /vop /devop /tmpop /moderate
I'm not sure how better hide them. For instance, if define these command list for operators in code (to check user operator or not, and do not display them) then it will be defined in two places twice (config and code), that is not good.
My suggestion is do not hide them but add sections. There a new special symbol can be added in bnhelp.conf
@
that designates a section title (or just use brackets[Title]
).Then output of /help will be like this:
List of commands will be more convenient, it will be easier to find a command.
Normal user (cg=1) will see all the sections except
Admin commands
.