User Guide ‐ Main interface ‐ Automods ‐ Level - MarechJ/hll_rcon_tool GitHub Wiki

🧭 You are here : Wiki home / User Guide / Main interface / Automods / Level


image

This automod enforces minimum and maximum level on server's entry and defined roles.

This automod has 2 features :

  • Global server min/max level :
    • No warning, players are kick after connection if they don't match level requirements.
  • Min level by role (3 steps) :
    • warning via direct message (Y times) ;
    • punish (Z times) ;
    • kick.

[!Note]
The state cycle for a given player only resets once the rule-violation is fixed.
So, for example, if you disable the kick and have 3 punishes configured, once the 3 punishes are through, that's it : nothing will happen anymore to the players, even if they still break level thresholds rules.

Parameters (CODE view)

"enabled"

Enables or disables the whole automod.

Default (disabled) :

  "enabled": false,

To enable :

  "enabled": true,

"dry_run"

If this is set to true, NO warning / punish / kick will be applied for real.
It turns the code into a "simulation" mode and only reports to the Discord audit log webhook.

Default (enabled) :

  "dry_run": true,

To disable :

  "dry_run": false,

"discord_webhook_url"

Discord webhook URL where audit logs should be sent.

[!NOTE] If you don't know how to create a Discord webhook, you can have a look at this video.

Default : null

  "discord_webhook_url": null,

With a webhook :

  "discord_webhook_url": "https://discord.com/api/webhooks/...",

"whitelist_flags"

This is either an empty list [], or a list of flags to exempt a player from this automod features.
To use, add a flag or multiple flags to the list, then flag the players you want to exempt in the CRCON UI.

Default :

  "whitelist_flags": [
    "🚨"
  ],

No whitelist flag :

  "whitelist_flags": [],

Multiple whitelist flags :

  "whitelist_flags": [
    "🚨",
    "❤️"
  ],

"dont_do_anything_below_this_number_of_players"

The automod won't do anything below this number of players on the server.
Set to 0 if you want the automod to be always active, regardless the number of players.

Default :

  "dont_do_anything_below_this_number_of_players": 0,

Announcement

"announcement_enabled"

Announce that the server has managed level thresholds when at least one level thresholds rule is enabled.
This message occurs only once, when a player connects to the server.

Default :

  "announcement_enabled": false,

To enable :

  "announcement_enabled": true,

"only_announce_impacted_players"

Only make the announce to players that are impacted by the level thresholds rules.

Default :

  "only_announce_impacted_players": true,

To disable :

  "only_announce_impacted_players": false,

"announcement_message"

The following variables are available :

  • {min_level_msg} from min_level_message value ;
  • {max_level_msg} from max_level_message value ;
  • {level_thresholds_msg} from level_thresholds's message value

Default :

  "announcement_message": "This server is under level thresholds control.\n\n{min_level_msg}{max_level_msg}{level_thresholds_msg}\nThanks for understanding.",

Warnings

"number_of_warnings"

Send a direct warning message to the players that violate level thresholds rules.

Default (disabled) :

  "number_of_warnings": 0,

Enabled (2 warnings) :

  "number_of_warnings": 2,

Enabled (infinite warnings) :

  "number_of_warnings": -1,

"warning_interval_seconds"

This is the number of seconds until moving to the next warning (or to the punish step if 'number_of_warnings' is reached).

Default :

  "warning_interval_seconds": 60,

"warning_message"

The following variables are available :

  • {player_name} ;
  • {squad_name} ;
  • {received_warnings} ;
  • {max_warnings} ;
  • {next_check_seconds}.

Default :

  "warning_message": "Warning, {player_name}! You violate level thresholds rules on this server: {violation}\nYou will be punished after {max_warnings} warnings (you already received {received_warnings}), then kicked.\nNext check will happen automatically in {next_check_seconds}s.",

Punish

[!Note]
If you have set number_of_warnings to -1, it will never reach that step.

"number_of_punishments"

Start punishing if the player still violates a level thresholds rule after number_of_warnings * warning_interval_seconds

Default (disabled) :

  "number_of_punishments": 0,

Advice : set number_of_warnings to -1 if you set this to 0. Enabled (2 punishes) :

  "number_of_punishments": 2,

Enabled (infinite warnings) :

  "number_of_punishments": -1,

"min_squad_players_for_punish"

Disable the punishes until the squad has at least this number of players.
ie : if you set 3, a squad of 2 will be immune to punishes (and kicks if enabled).

Default :

  "min_squad_players_for_punish": 0,

"min_server_players_for_punish"

This option is the same as above, but for the entire server.
If the server has less players than the number you set below, no punishes / kicks will be applied.

Default :

  "min_server_players_for_punish": 0,

"punish_interval_seconds"

This is the number of seconds to wait between punishes.

Default :

  "punish_interval_seconds": 60,

"punish_message"

The following variables are available :

  • {player_name} ;
  • {received_punishes} ;
  • {max_punishes} ;
  • {next_check_seconds} ;
  • {violation}.

Default :

  "punish_message": "You violated level thresholds rules on this server: {violation}.\nYou're being punished by a bot ({received_punishes}/{max_punishes}).\nNext check in {next_check_seconds} seconds",

Kick

[!Note]
If you have set number_of_punishments to -1, it will never reach that step.

"kick_after_max_punish"

Set to false if you don't want to kick players after they reached number_of_punishments.
Advice : set number_of_punishments to -1 if you set this to false.

Default :

  "kick_after_max_punish": true,

"min_squad_players_for_kick"

Same behavior as for the punishes :
if the squad has less players than this, automod won't kick.
ie : if you set 3, a squad of 2 will be immune to kicks.

Default :

  "min_squad_players_for_kick": 0,

"min_server_players_for_kick"

This option is the same as above, but for the entire server.
If the server has less players than the number you set below, no kicks will be applied.

Default :

  "min_server_players_for_kick": 0,

"kick_grace_period_seconds"

Number of seconds to wait before kicking after number_of_punishments has been reached.

Default :

  "kick_grace_period_seconds": 60,

"kick_message"

The following variables are available :

  • {player_name} ;
  • {squad_name} ;
  • {kick_grace_period} ;
  • {violation}.

Default :

  "kick_message": "You violated level thresholds rules on this server: {violation}.\nYour grace period of {kick_grace_period}s has passed.\nYou failed to comply with the previous warnings.",

Global server min/max level

"force_kick_message"

This is the message that will be used in the force kick without warnings when player does not match global level thresholds.
The following variables are available :

  • {player_name} ;
  • {squad_name} ;
  • {violation}.

Default :

  "force_kick_message": "You violated level thresholds rules on this server: {violation}.",

"min_level"

This allows to configure a global minimum level on the whole server and the matching kick message to display to players.

Default (disabled) :

  "min_level": 0,

"min_level_message"

The following variable is available :

  • {level} ;

Default :

  "min_level_message": "Access to this server is not allowed under level {level}",

"max_level"

This allows to configure a global maximumlevel on the whole server and the matching kick message to display to players.

Default (disabled) :

  "max_level": 0,

"max_level_message"

The following variable is available :

  • {level} ;

Default :

  "max_level_message": "Access to this server is not allowed under level {level}",

Global server roles levels

"violation_message"

Violation message used as a description of the level thresholds violation when player is messaged, punished and kicked.
The following variables are available :

  • {role} matching label's value of previous map
  • {level} matching level's value from previous map.

Default :

  "violation_message": "{role} are not allowed under level {level}",

"levelbug_enabled"

Enable (true) or disable (false) the protection against "level 1 bug".
Due to a missed synchro between Steam and the game server, any player can log in as level 1, no matter their real level.
They could then be punished if violating level rules.

Default (protection disabled) :

  "levelbug_enabled": false,

Immune level 1 players from warn/punishes/kicks :

  "levelbug_enabled": true,

Min level by role

"level_thresholds"

Restricts access to roles when :
player's level is below min_level AND server's players count is >= min_players.

  • Available roles : armycommander, officer, antitank, automaticrifleman, assault, heavymachinegunner, support, sniper, spotter, rifleman, crewman, tankcommander, engineer, medic.
  • Label's values are the roles translations in your language.

[!Note]
You shouldn't use rifleman, as it is the default role all the players get when entering the game.

Default (disabled) :

  "level_thresholds": {}

Example : Commander must be >= lvl 50, Officer >= 30

  "level_thresholds": {
    "armycommander": {
      "label": "Commander",
      "min_players": 0,
      "min_level": 50
    },
    "officer": {
      "label": "Officer",
      "min_players": 0,
      "min_level": 30
    }
  }