CommunityMod
CommunityMod communitymod

3.99 EUR

Checkout
communitymod

CommunityMod

Project: CommunityMod
Language (Code): C# (Oxide/uMod)
In‑Game Language: English
Author: @RustFlash


Summary

Community moderation by vote: Timeout (Mute), Kick, and Ban. Clear quorums, minimum participation, cooldowns, immunities (Admins/Mods), blacklist for trolls, Discord webhook for logging, and broadcast hints in‑game. Respects BetterChat (muted players can’t write). Lightweight, runs in the background, self‑cleans.


Features

🎯 Voting Logic

  • Actions: Timeout, Kick, Ban
  • Configurable yes percentages per action (Timeout/Kick/Ban)
  • Minimum participation (%) and minimum players online
  • Early finish: ends the vote once the outcome is mathematically decided (or impossible)

🕒 Cooldowns & Timeouts

  • Player cooldown after a successful measure (prevents spam against the same person)
  • Timeout (Mute) with remaining‑time display when chatting/joining
  • Automatic cleanup of expired timeouts every 10s

🛡️ Control & Protection

  • Immune: Admins/Mods/permission communitymod.immune
  • Blacklist: block players from starting further votes / allow again
  • Admin cancel: abort a running vote

🔧 Integration & Telemetry

  • BetterChat: muted players are reliably blocked
  • File logging + optional Discord webhook
  • Server broadcast with custom info message and interval

Commands

Chat Command Alias Description Permission
/timeout <name> [sec] /mute Starts a vote to mute (seconds optional; capped) communitymod.use
/kickplayer <name> /votekick Starts a vote to kick communitymod.use
/banplayer <name> /voteban Starts a vote to ban communitymod.use
/voteyes /vyes Vote Yes communitymod.use
/voteno /vno Vote No communitymod.use
/votestatus /vstatus Status: time, yes/no counters communitymod.use
/votecancel /vcancel Abort a running vote communitymod.admin
/voteblock <name> /vblock Prevent a player from starting more votes communitymod.admin
/voteunblock <name> /vunblock Lift the start ban communitymod.admin
/voteblacklist /vblacklist Show the list of blocked players communitymod.admin

Console: The same identifiers exist as console commands (without /).


Permissions

communitymod.use        – May start votes and vote
communitymod.immune     – Immune to votes
communitymod.moderator  – Moderator immunity (like Admin)
communitymod.admin      – Admin functions (Cancel/Block/Unblock/Blacklist)

Configuration (Excerpt)

{
  "Vote Settings": {
    "Timeout Vote Percentage Required": 60,
    "Kick Vote Percentage Required": 70,
    "Ban Vote Percentage Required": 80,
    "Vote Duration (Seconds)": 60,
    "Minimum Participation Percentage": 30,
    "Minimum Players Online": 5
  },
  "Cooldown Settings": {
    "Player Vote Cooldown (Minutes)": 10,
    "Default Timeout Duration (Seconds)": 300,
    "Max Timeout Duration (Seconds)": 3600
  },
  "Security Settings": {
    "Logging Enabled": true,
    "Discord Webhook URL (Optional)": "",
    "Broadcast Enabled": true,
    "Broadcast Interval (Minutes)": 90,
    "Broadcast Message": "<color=#FFA500>[CommunityMod]</color> Vote against disruptive players!\n\n<color=#FFFF00>Commands:</color> /timeout [NAME] | /kickplayer [NAME] | /banplayer [NAME]\n<color=#FFFF00>Vote:</color> /voteyes or /voteno"
  }
}

Notes

  • Timeout duration in /timeout is capped at MaxTimeoutDuration.
  • Minimum players must be online or the vote won’t start.
  • Participation: If minimum participation isn’t reached, the vote fails even with a high Yes rate.
  • Blacklist persists to CommunityModBlacklist.json.

Installation

  1. Place CommunityMod.cs into oxide/plugins/.
  2. Start the server / reload the plugin.
  3. Grant permissions by role (see above).
  4. Optional: set Discord webhook in the config, configure broadcast.

Examples

  • Mute a player (5 minutes default):
    • /timeout ToxicTom → starts a mute vote (300s)
    • /timeout ToxicTom 900 → requests 900s but will be capped by MaxTimeoutDuration
  • Admin aborts a nonsense vote:
    • /votecancel
  • Stop a troublemaker from constantly starting votes:
    • /voteblock RandomGuy → later /voteunblock RandomGuy

Troubleshooting (short)

  • “No permission” → missing permission.
  • “A vote is already running” → end/wait for the current vote.
  • “At least X players must be online” → adjust the minimum‑online threshold.
  • Immunity applies → Admin/Mod/communitymod.immune or manually in the immune list.
  • Discord webhook 4xx/5xx → check the URL; errors are logged to console.

Load, run, enjoy.