Skip to content

Commit

Permalink
Subcommands big update, detailed description below
Browse files Browse the repository at this point in the history
- Allow subcommands - now commands form a tree, and not just an array
- Move definitions of commands to commands.xml, that means, only the code for non-trivial commands and a few permissions for commands are hardcoded; otherwise, whether a command exists or who can use it is decided by server host only
- Rewrite /commands and /help according to new structure
- Split several commands into a public version without arguments for checking the value of the corresponding parameter, and a private version with arguments for editing the value
- Add a message when invoking not implemented commands mentioned in commands.xml
- Allow reading bitwise OR of bitmask enum values from XML (currently ints cannot be read though)

Notes:

- If a command has subcommands, it can only be invoked without arguments
- The only subcommand of another command can be specified as omit-name="true", then it means it can be found by its name, but its name should not be written when invoking command. This is done to allow using e.g. /troll and /troll 1 at the same time, invoking "looking" and "editing" commands for them (instead of /troll = 1).
  • Loading branch information
kimden committed Jun 19, 2023
1 parent 6b0f730 commit ffc66fa
Show file tree
Hide file tree
Showing 5 changed files with 1,385 additions and 637 deletions.

0 comments on commit ffc66fa

Please sign in to comment.