This changes the behaviour of the following commands:
- `/ban`
- `/timeout`
- `/untimeout`
- `/unban`
All of those commands now accept one or more `--channel` parameters to override which channel the action should take place in.
The `--channel` parameter accepts a channel ID or channel name with the same syntax as the other "user targets" do (e.g. `id:11148817` or `pajlada`)
examples
Ban user in the chat you're typing in:
`/ban weeb123`
Ban user in the chat you're typing in, with a reason specified:
`/ban weeb123 the ban reason`
Ban user in a separate chat, with a reason specified:
`/ban --channel pajlada weeb123 the ban reason`
Ban user in two separate chats, with a reason specified:
`/ban --channel pajlada --channel id:117166826 weeb123 the ban reason`
Timeout user in the chat you're typing in:
`/timeout weeb123`
Timeout user in the chat you're typing in, with a reason specified:
`/timeout weeb123 10m the timeout reason`
Timeout user in a separate chat, with a reason specified:
`/timeout --channel pajlada weeb123 10m the timeout reason`
Timeout user in two separate chats, with a reason specified:
`/timeout --channel pajlada --channel id:117166826 weeb123 10m the timeout reason`
Unban user in the chat you're typing in:
`/unban weeb123`
Unban user in a separate chat:
`/unban --channel pajlada weeb123`
Unban user in two separate chats:
`/unban --channel pajlada --channel id:117166826 weeb123`
Use QTemporaryDir to create the test directory
Add option to use httpbin over local docker
Increase delay for opening a connection
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* ci: format yaml and json files with prettier
* chore: add changelog entry
* fix: format everything
* ci: run pretter on all files
* ci: rename prettier step
* Use circular buffer for LimitedQueue
* Reduce copying of snapshot
* Small optimizations
* Remove unneeded lock statements
* Add LimitedQueue tests
* Fix includes for limited queue benchmark
* Update CHANGELOG.md
* Use correct boost version iterators
* Use a shared_mutex to clarify reads and writes
* Update `find`/`rfind` to return the result as a boost::optional
* Use `[[nodiscard]]` where applicable
* Update comments
* Add a couple more doc comments
* Replace size with get
get is a safe (locked & checked) version of at
* Use std::vector in LimitedQueueSnapshot
* Update LimitedQueue benchmarks
* Add mutex guard to buffer accessors
We do not know whether T is an atomic type or not
so we can't safely say that we can copy the value
at a certain address of the buffer.
See https://stackoverflow.com/a/2252478
* Update doc comments, add first/last getters
* Make limit_ const
* Omit `else` if the if-case always returns
* Title case category comments
* Remove `at`
* Fix `get` comment
* Privatize/comment/lock property accessors
- `limit` is now private
- `space` is now private
- `full` has been removed
- `empty` now locks
* Remove `front` function
* Remove `back` method
* Add comment to `first`
* Add comment to `last`
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* Add basic benchmark
* Add basic documentation for how to run and add tests/benchmarks
* Update benchmark example output
* Add changelog entry
Co-authored-by: zneix <zneix@zneix.eu>