mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-09-01 16:48:26 +00:00
Update per-user rate limit and implement version command support
- Increased the per-user rate limit from 5 to 30 seconds across multiple configuration files to reduce response frequency. - Added the version command to the configuration examples and updated help text to include the new command. - Refactored version information retrieval in the bot and web viewer to utilize a shared runtime resolver for consistency. - Improved documentation in README.md to reflect changes in commands and configuration options.
This commit is contained in:
@@ -300,7 +300,8 @@ class CommandManager:
|
||||
if wait_time > 0.1:
|
||||
return False, f"Rate limited. Wait {wait_time:.1f} seconds"
|
||||
return False, ""
|
||||
# Per-user rate limit when enabled and key present
|
||||
# Per-user rate limit when enabled and key present.
|
||||
# Admin ACL controls command authorization only; it does not bypass send rate limits.
|
||||
if getattr(self.bot, 'per_user_rate_limit_enabled', False) and rate_limit_key:
|
||||
per_user = getattr(self.bot, 'per_user_rate_limiter', None)
|
||||
if per_user and not per_user.can_send(rate_limit_key):
|
||||
|
||||
Reference in New Issue
Block a user