About AutoReportBan
Overview
AutoReportBan is a powerful Rust server plugin that automatically bans players who receive multiple reports within a configurable time window. It leverages Rust's native F7 report system to detect and process player reports, allowing server administrators to maintain a cleaner gaming environment with minimal manual intervention. It's a very effective and fast way to deal with rage cheaters, without admin intervention.
Features
- Automatically processes player reports from Rust's native F7 report system
- Configurable threshold for the number of unique reports needed to trigger a ban
- Adjustable time window for counting reports
- Option for temporary or permanent bans
- Discord webhook integration for reports and ban notifications
- Admin commands for monitoring and managing reports
- Automatic cleanup of old reports and expired temporary bans
- It doubles as a report log to discord for every report via F7.
Installation
1. Download the `AutoReportBan.cs` file
2. Place it in your server's `oxide/plugins` directory
3. Restart your server or use the `oxide.reload AutoReportBan` command
Permissions
autoreportban.admin - Required to use all admin commands (listreports, checkplayer, testreport, testwebhook, cleanreports)
Configuration
After the first run, the plugin will generate a default configuration file at `oxide/config/AutoReportBan.json`. You can modify the following settings:
{
"Reports threshold": 10,
"Time window (minutes)": 30,
"Ban reason template": "Banned by server",
"Ban duration (minutes, 0 = permanent)": 0,
"Debug mode": false,
"Discord Webhook URL": "",
"Report Discord Webhook URL": "",
"Discord Bot Name": "Auto Report Ban",
"Server Name": "Rust Server"
}
Configuration Options
- **Reports threshold**: The number of unique reports a player must receive within the time window to trigger a ban
- **Time window (minutes)**: The time period during which reports are counted
- **Ban reason template**: The reason displayed to banned players
- **Ban duration (minutes, 0 = permanent)**: How long temporary bans last (0 = permanent ban)
- **Debug mode**: Enables detailed logging for troubleshooting
- **Discord Webhook URL**: URL for Discord Ban notifications (leave empty to disable)
- **Report Discord Webhook URL**: URL for Report notifications (leave empty to disable)
Usage
Player Reporting
Players can report others using Rust's native F7 report system. The plugin tracks these reports and automatically bans players who receive enough unique reports within the configured time window.
Console Commands
The plugin provides several console commands to monitor and manage reports:
- listreports - Shows all active reports in the system
- checkplayer <name/steamid> - Shows detailed reports for a specific player
- testreport <reporter> <target> - Creates a test report for debugging
- testwebhook - Tests the Discord webhook integration
- cleanreports - Manually triggers cleanup of old reports
Discord Integration
If you provide a Discord webhook URL in the configuration, the plugin will send notifications to your Discord channel whenever a player is banned. The notification includes:
- Player name and Steam ID
- Ban reason
- Ban duration
- Number of reports received
How It Works
1. When a player reports another player using the F7 menu, the plugin captures this report
2. The report is stored with information about the reporter, target, reason, and timestamp
3. The plugin checks if the reported player has received enough unique reports within the time window
4. If the threshold is met, the player is automatically banned
5. Old reports are automatically cleaned up based on the configured time window
6. Temporary bans are automatically removed when they expire
Best Practices
- Set a reasonable threshold based on your server population
- Adjust the time window to balance between quick action and false positives
- Monitor the system initially to ensure it's working as expected
Troubleshooting
If you encounter issues:
1. Enable debug mode in the configuration
2. Check the server console for detailed logs
3. Use the `testreport` command to verify the system is processing reports correctly
4. Use the `testwebhook` command to verify Discord integration
Notes
- The plugin only counts unique reporters (each player can only report another player once)
- Reports older than the configured time window are automatically removed
- The plugin works with both online and offline players
- Banned players will be kicked if they are online when banned
- Safe to use in both modded and community servers.