Readme

Moderation

Moderation is a fully async moderation system that will not affect your server in anyway for example like lag, not responding when somebody is joining the server. It has a direct connection with your mysql database which means that you will not have to rely on any other external services to be online for people not to join your server.

Commands

  • /ban <player> [reason] [duration] – Bans specified player for duration with reason.
  • /unban <player> – Removes specified player latest ban.
  • /bans [player] – Displays a list of all or player bans.
  • /kick <player> [reason] – Kicks specified player for reason.
  • /warn <player> [reason] – Warns specified player for reason.
  • /checkowner – Check's the owner of barricade/structure/locked vehicle.
  • /playerinfo <player> – Displays player name, country and bans, kicks, warns count.
  • /glitch – Teleports you to suspected glitch barricade or structure.

Configuration

<?xml version="1.0" encoding="utf-8"?>
<ModerationConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Commands>
    <MessageColor>grey</MessageColor>
    <ShouldRequireReason>true</ShouldRequireReason>
    <ShouldBroadcastBan>true</ShouldBroadcastBan>
    <ShouldBroadcastUnban>true</ShouldBroadcastUnban>
    <UseHwidBans>true</UseHwidBans>
    <UseIPBans>false</UseIPBans>
    <IPBanCommandName>ipban</IPBanCommandName>
    <HWIDBanCommandName>hwidban</HWIDBanCommandName>
    <SteamIDBanCommandName>steamidban</SteamIDBanCommandName>
    <AllBanCommandName>ban</AllBanCommandName>
  </Commands>
  <Database>
    <MySQLAddress>127.0.0.1</MySQLAddress>
    <MySQLUsername>root</MySQLUsername>
    <MySQLPassword>password123</MySQLPassword>
    <MySQLDatabase>unturned</MySQLDatabase>
    <MySQLDatabasePort>3306</MySQLDatabasePort>
    <PlayersTableName>Players</PlayersTableName>
    <BansTableName>Bans</BansTableName>
    <PunishmentsTableName>Punishments</PunishmentsTableName>
    <EnableGameThreadWarnings>true</EnableGameThreadWarnings>
  </Database>
  <PlayerService>
    <ShouldSaveCountry>true</ShouldSaveCountry>
  </PlayerService>
  <UnbanService>
    <IsEnabled>false</IsEnabled>
    <RefreshTimeSeconds>30</RefreshTimeSeconds>
  </UnbanService>
  <DiscordService>
    <UseWebhooks>true</UseWebhooks>
    <ServerFooterEnabled>false</ServerFooterEnabled>
    <Webhooks>
      <DiscordWebhook WebhookType="Ban" WebhookUrl="" WebhookColor="ff0000" Inline="false">
        <MessageFormat>Name: {name}, SteamID: {steamid}, Punisher: {punisher}, Duration: {duration}, Reason: {reason}</MessageFormat>
      </DiscordWebhook>
      <DiscordWebhook WebhookType="Kick" WebhookUrl="" WebhookColor="f06c00" Inline="false">
        <MessageFormat>Name: {name}, SteamID: {steamid}, Punisher: {punisher}, Reason: {reason}</MessageFormat>
      </DiscordWebhook>
      <DiscordWebhook WebhookType="Warn" WebhookUrl="" WebhookColor="ffff00" Inline="false">
        <MessageFormat>Name: {name}, SteamID: {steamid}, Punisher: {punisher}, Reason: {reason}</MessageFormat>
      </DiscordWebhook>
      <DiscordWebhook WebhookType="Unban" WebhookUrl="" WebhookColor="00ff33" Inline="false">
        <MessageFormat>Name: {name}, SteamID: {steamid}, Unbanner: {punisher}</MessageFormat>
      </DiscordWebhook>
      <DiscordWebhook WebhookType="Spy" WebhookUrl="" WebhookColor="00ff33" Inline="false">
        <MessageFormat>{punisher} spied {name} [{steamid}] on {servername}!</MessageFormat>
      </DiscordWebhook>
    </Webhooks>
  </DiscordService>
  <CooldownService>
    <Cooldowns>
      <CooldownKey Key="spy" Cooldown="10" />
    </Cooldowns>
  </CooldownService>
</ModerationConfiguration>

Translations

<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Translation Id="BanBroadcast" Value="{0} was banned by {1} for {2} for {3}!" />
  <Translation Id="BanMessage" Value="[BAN] Reason: {0} Time Left: {1}" />
  <Translation Id="BansLimit" Value="You can't view the list of all bans in-game, specify player or use console" />
  <Translation Id="BansLine" Value="BanID: {0} SteamName: {1} SteamID: {2} PunisherName: {3} PunisherId: {4}" />
  <Translation Id="BansNone" Value="There is no bans" />
  <Translation Id="UnbanBroadcast" Value="{0} was unbanned!" />
  <Translation Id="UnbanExpired" Value="{0} ban expired!" />
  <Translation Id="UnbanFail" Value="{0} doesn't have any active ban." />
  <Translation Id="KickAnnouncement" Value="{0} was kicked by {1} for {2}" />
  <Translation Id="WarnAnnouncement" Value="{0} was warned by {1} for {2}" />
  <Translation Id="CheckownerFail" Value="You are not looking at any barricade, structure or locked vehicle." />
  <Translation Id="CheckownerOwnerName" Value="The owner of this {0} is {1} (banned: {2})" />
  <Translation Id="CheckownerOwnerSteamId" Value="Steam ID: {0}" />
  <Translation Id="CheckownerLastActive" Value="{0} was last active on {1}" />
  <Translation Id="RequireReason" Value="You must specify a reason!" />
  <Translation Id="PlayerInfoMessage" Value="{0} from {1} has {2} bans, {3} kicks &amp; {4} warns" />
  <Translation Id="NoGlitches" Value="Could not find any suspected glitch object on the map." />
  <Translation Id="GlitchMessage" Value="You have been teleported to suspected glitch object!" />
  <Translation Id="Permanent" Value="permanent" />
  <Translation Id="PlayerNotFound" Value="Player not found!" />
  <Translation Id="KickInvalid" Value="You must specify target player!" />
  <Translation Id="WarnInvalid" Value="You must specify target player!" />
  <Translation Id="BanInvalid" Value="Ban format: /ban &lt;player&gt; [reason] [duration]" />
  <Translation Id="UnbanNotBanned" Value="{0} doesnt have any active bans!" />
  <Translation Id="UnbanInvalid" Value="You must specify player steamID!" />
  <Translation Id="PlayerInfoInvalid" Value="You must specify target player!" />
  <Translation Id="HWIDBanDisabled" Value="HWID bans are disabled" />
  <Translation Id="IPBanDisabled" Value="IP bans are disabled" />
  <Translation Id="ReasonUnspecified" Value="Unspecified" />
  <Translation Id="SpyNoPermission" Value="You don't have permission to spy" />
  <Translation Id="SpyFail" Value="Spy format: /spy &lt;player&gt;" />
  <Translation Id="SpySuccess" Value="Successfully spied {0}!" />
  <Translation Id="SpyCooldown" Value="You have to wait {0} before you can spy again" />
</Translations>