-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Allow arbitrary RCon commands in chat commands (#678)
* Allow to run arbitrary rcon commands from chat commands * add example for rcon command chat command * Allow autosettings to enable and disable single chat commands * Update api_commands.py Signed-off-by: Florian <florian.schmidt.welzow@t-online.de> * refactor chat commands * Add conditions to chat rcon commands These conditions work in a very same way as conditions in Auto Settings (they are shared between them both). All conditions are available in chat rcon commands, conditions that rely on the player_id metric are only available in chat commands. Using these conditions in auto settings will implicitly default to "condition is met". Two new conditions are available for chat commands (requiring the player_id metric source): - player_flags: A condition that is met, when the player has at least one of the provided flags. A list of flags can be provided, which are combined with OR, meaning that the player requires only one of these flags to meet the condition. - player_id: A condition thgat is met, when the player's ID is in the provided list of static IDs. This ID can either be the player's Steam ID or Windows ID, depending on whatever the player's platform is Allowing the use of the auto settings conditions is a bit redundant, as a single chat command can still be enabled and disabled using the set_chat_command_enabled api, which is also available in auto settings. However, this gives the user freedom to enable/disable the command using auto settings, or by a condition in the command itself, whatever they prefer. * WIP: Arguments in chat rcon commands * Remove api endpoint to enable/disable rcon chat commands With conditions on chat commands, the main use case to allow autosettings enabling/disabling commands, this is not required anymore. * WIP: Move rcon chat commands to a separate config * WIP: Seed default (disabled) rcon chat commands * add missing permissions, endpoints and default * correctly apply default * add redeploy example command * black/isort * command_words need to be on the base class as well --------- Signed-off-by: Florian <florian.schmidt.welzow@t-online.de> Co-authored-by: C. Eric Mathey <emathey@protonmail.com>
- Loading branch information
Showing
53 changed files
with
1,514 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.