Major Features Added: - Complete token bucket rate limiting for IRC commands and web interface - Per-user rate tracking with category-based limits (Basic, Gameplay, Management, Admin, Web) - Admin commands for rate limit management (\!rate_stats, \!rate_user, \!rate_unban, \!rate_reset) - Automatic violation tracking and temporary bans with cleanup - Global item spawn multiplier system with 75% spawn rate reduction - Central admin configuration system (config.py) - One-command bot startup script (start_petbot.sh) Rate Limiting: - Token bucket algorithm with burst capacity and refill rates - Category limits: Basic (20/min), Gameplay (10/min), Management (5/min), Web (60/min) - Graceful violation handling with user-friendly error messages - Admin exemption and override capabilities - Background cleanup of old violations and expired bans Item Spawn System: - Added global_spawn_multiplier to config/items.json for easy adjustment - Reduced all individual spawn rates by 75% (multiplied by 0.25) - Admins can fine-tune both global multiplier and individual item rates - Game engine integration applies multiplier to all spawn calculations Infrastructure: - Single admin user configuration in config.py - Enhanced startup script with dependency management and verification - Updated documentation and help system with rate limiting guide - Comprehensive test suite for rate limiting functionality Security: - Rate limiting protects against command spam and abuse - IP-based tracking for web interface requests - Proper error handling and status codes (429 for rate limits) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
51 lines
No EOL
1 KiB
JSON
51 lines
No EOL
1 KiB
JSON
{
|
|
"backup_settings": {
|
|
"database_path": "data/petbot.db",
|
|
"backup_directory": "backups",
|
|
"compression": {
|
|
"enabled": true,
|
|
"level": 6
|
|
},
|
|
"retention_policy": {
|
|
"daily_backups": 7,
|
|
"weekly_backups": 4,
|
|
"monthly_backups": 12,
|
|
"manual_backups": 20
|
|
},
|
|
"schedule": {
|
|
"daily": {
|
|
"enabled": true,
|
|
"hour": 3,
|
|
"minute": 0
|
|
},
|
|
"weekly": {
|
|
"enabled": true,
|
|
"day": "sunday",
|
|
"hour": 2,
|
|
"minute": 0
|
|
},
|
|
"monthly": {
|
|
"enabled": true,
|
|
"day": 1,
|
|
"hour": 1,
|
|
"minute": 0
|
|
}
|
|
},
|
|
"monitoring": {
|
|
"log_level": "INFO",
|
|
"alert_on_failure": true,
|
|
"max_backup_size_mb": 1000,
|
|
"min_free_space_mb": 500
|
|
}
|
|
},
|
|
"security": {
|
|
"admin_users": ["admin", "megaproxy"],
|
|
"backup_encryption": false,
|
|
"verify_integrity": true
|
|
},
|
|
"notifications": {
|
|
"success_notifications": false,
|
|
"failure_notifications": true,
|
|
"cleanup_notifications": true
|
|
}
|
|
} |