Skip to content

v1.2.12-styrax

Choose a tag to compare

@github-actions github-actions released this 02 Oct 20:25

What Changed

- Command aliases

Command aliases are introduced alongside with a new alias command.
Comand aliases are shortcut names for commands you use often. Instead of always writing a long command, you can now create an alias of this command and then use it instead of your command:

botwave › alias smf 'start myfile.wav 96.9 false "Hello" "world!"'
[OK] Set alias 'smf' to represent 'start myfile.wav 96.9 false "Hello" "world!"'
botwave › smf
[OK] Started broadcasting /opt/BotWave/uploads/myfile.wav on 96.9MHz

Aliases can be partial commands. Any arguments provided to an alias are directly appended to the command.

botwave › alias setme "set me"
[OK] Set alias 'setme' to represent 'set me'
botwave › alias list
setme: set
  Command: set me
  Missing: <value> [immutable]
botwave › setme douxx@douxx.tech
[ENV] (ME) douxx@douxx.tech

Note

alias has been added to the default REMOTE_BLOCKED_CMD to avoid remote attackers bypassing the limits using aliases.

  • help commands order: The commands shown by help are now in alphabetical order.
  • Misc: dlogger was bumped to 1.0.6

Updating to this version

To update to this version, run the following command:

bw-update --to v1.2.12-styrax
Commit history
  • [meta] releases.txt: v1.2.12-styrax (f9d1c2d)
  • [shared] ops/alias.py: more examples (7506738)
  • [shared] aliases.py: moved a log level from warning to debug to not pollute startup logs (bae9b9c)
  • [shared] aliases.py: fixed Aliases() crashing the whole program on PermissionError (d627f6f)
  • [wiki] *.md: sync GitHub wiki into /wiki (74accaa)
  • Merge pull request #108 from dpipstudio/aliases (1b32c61)
  • [meta] installation.json: added shared/aliases.py and shared/ops/alias.py to installation files (6ca0489)
  • [shared] ops/alias.py: prevent '=' in aliases (094225b)
  • [shared] aliases.py: clear self.aliases at the start of load() (4fc554c)
  • [shared] aliases.py: dont stop loading EVERY alias when a single one fails for x reason (315f352)
  • [shared] ws_cmd.py: added 'alias' to the default blocked commands (97bc83e)
  • [shared] ops/alias.py: added long_help and warning message on list_aliases (96ab3cc)
  • [shared] aliases.py, ops/alias.py: allow the listing and removal of aliases (a686ed0)
  • [shared] ops/{help, reload}.py: added support for aliases (ae68108)
  • [server] server.py: load aliases on startup (38762ab)
  • [shared] aliases.py: update the prompt commands on a new alias (a80ebc5)
  • [shared] ops/alias.py: prevent the creation of aliases that self-reference or overwrite builtin commands (fefb6ea)
  • [shared] ops/alias.py: made the "name" field mandatory (9b88302)
  • [local] local.py: load aliases on startup (4df5c02)
  • [shared] ops/alias.py: shared "alias" command to manage aliases (85ef213)
  • [shared] aliases.py, ops.py: new alias manager and OP (fcefb0c)
  • [meta] installation.json: bump dlogger to 1.0.6 (e244d83)
  • [meta] installation.json: update for v1.2.11-bixa (5dd8519)