highPingKicker
Automatically kick players with high ping, with warnings and configurable thresholds.
Cron Jobs
- Ping check - Temporal Value: */5 * * * *
Config variables
- pingThreshold number - A ping value that is deemed too high and prompts a warning.
- warningsBeforeKick number - Number of warnings before a player is kicked.
Key Features
- Automatic ping monitoring
- Configurable ping thresholds
- Warning system before kicks
- Customizable number of warnings
- Player immunity options through permissions
Configuration Options
1. Ping Threshold
- Default value: 200ms
- Purpose: Defines the maximum acceptable ping value
- When a player's ping exceeds this threshold, they begin receiving warnings
- Can be adjusted based on your server's requirements and geographical location
2. Warnings Before Kick
- Default value: 3 warnings
- Purpose: Determines how many warnings a player receives before being kicked
- Provides players with opportunities to resolve connection issues
- Each warning is tracked individually per player
How It Works
The module operates on a 5-minute cycle (configured via cron job: */5 * * * *
) and performs the following steps:
- Monitoring: Checks all online players' ping values
- Warning System:
- If a player's ping exceeds the threshold, they receive a warning
- Warnings are tracked using Takaro's variable system
- Each subsequent high ping check increments the warning count
- Kick Action:
- When warnings reach the configured limit, the player is kicked
- Kick message includes their ping value for reference
- Warning count is reset after a kick
Example warning message:
Server is shutting down in 5 minutes for daily maintenance. We'll be back online in ~10 minutes. Please find a safe spot!
Implementation Details
The module uses Takaro's variable system to track warnings with the key highPingKicker:warnings
. This ensures persistence across server restarts and allows for accurate warning tracking.
Warning Process:
- First high ping detection: Creates warning variable
- Subsequent detections: Increments warning count
- Final warning: Executes kick and resets counter
Permissions
The module includes one permission:
GEOBLOCK_IMMUNITY
: Players with this permission will not be kicked regardless of their ping- Useful for administrators or trusted players
- Can be assigned through Takaro's role system
Installation
- Navigate to your server's Modules section
- Select "Install New Module"
- Find and select "highPingKicker"
- Configure the desired ping threshold and warning count
- Save and activate the module
Best Practices
- Initial Setup:
- Start with default values (200ms ping threshold, 3 warnings)
- Monitor player feedback and server logs
- Adjust values based on your community's needs
- Threshold Configuration:
- Consider your server's geographical location
- Account for typical ping ranges in your target regions
- Set thresholds that balance performance with accessibility
- Warning Management:
- Use enough warnings to allow for temporary connection issues
- Keep warning count reasonable to maintain server performance
- Consider time between checks (default 5 minutes)
Troubleshooting
Common issues and solutions:
- Too Many Kicks:
- Increase ping threshold
- Add more warnings before kick
- Review server performance metrics
- Ineffective Management:
- Decrease ping threshold
- Reduce warning count
- Decrease check interval
- False Positives:
- Grant immunity to affected players
- Adjust threshold based on time of day