Syntax: Select all
@Command("auth group <group> add <permission>")
def auth_group_add(source, group, permission):
pass
but it could just as easily be used for other commands, imagine:
Syntax: Select all
@Command("sp_ignite <PlayerFilter :p layer> [int:time]")
def sp_ignite(source, player, time=0)
pass
Any thoughts on this, or ways to improve it? If not, I'll likely begin working on this once SourcePerms is in an appropriate state.
Sidenote: It is really quite easy to do this with a simple regex
Edit: Forgot to mention an important part: Similar to how Flask's rules work, I would have it so that it tried to match to the function with the most valid params, so if you used "sp auth groups" if wouldn't match it to the above function, it would match it to @Command("sp auth groups") and provide help (with the option for that to be autogenerated, likely) or what have you.