SlotBlocker

One Life Event (OLE) slot-blocking hook script for DCS World.

Purpose

Controls which player slots are available based on:

  1. UCID bans — administrators can block / unblock specific players via chat commands.
  2. MW-50 quota — limits how many players can occupy the MW-50 asset depending on the blue-vs-red player ratio.
  3. Instructor bypass — instructor slots (instructor_red_1, instructor_blue_1) are never blocked.

Installation and Deployment

This file is a DCS World GameGUI hook, not a mission script. It must be placed on the DCS dedicated server (or host machine) in the hooks directory.

Server-side placement

Copy WWII_OLE_GameGUI_8.lua into your DCS World hooks folder:

Restart the DCS server process. The script self-registers via DCS.setUserCallbacks(); no mission-level dofile or trigger action is required.

Deployment notes

Access control (optional)

By default any player who knows the chat prefix can issue commands. Restrict this to trusted UCIDs by editing the CFG.admin_ucids table near the top of the script:

admin_ucids = {
  ["A1B2C3D4E5F67890"] = true,
  ["1122334455667788"] = true,
},

Architecture

OLEConfigStateDCS WorldAdminPlayeronPlayerTryChangeSlotonPlayerTrySendChatonSimulationFrame slot attemptevery framechat commandread rulescheck blocked UCIDsadd / remove UCIDkick banned seated players allow / blockforced to spectators

Slot Change Flow

slot nil or empty?instructor slot?UCID banned?MW-50 unit?under quota? yesnoyesnoyesnonoyesyesno

Admin Chat Command Flow

message starts with ole?sender is admin?ole ban u003cucidu003e?ole unban u003cucidu003e?ole status?ole help?add UCID to blocked setqueue kick if not already queuedremove UCID from blocked setlog blocked UCIDslog command usage noyesyesnoyesnoyesnoyesnoyesno

Simulation Frame Kick Flow

kick_scheduled set?now >= scheduled time?iterate all playersplayer UCID banned?player has active slot?force_player_slot(0, "")clear kick_scheduled noyesnoyesyesnoyesnodone

Configuration

Variable Type Description
mw50_rules table Ordered list of {max_ratio, max_mw50} limits. Ratio = blue / red.
chat_prefix string Admin command prefix (default "ole").
kick_delay number Seconds before a newly banned player is kicked (default 15). If already scheduled, earlier kick wins.
instructor_slots table Slot IDs that bypass all checks.
admin_ucids table Optional authorised UCID whitelist. Empty = no restriction.

Default MW-50 rules:

Blue / Red ratio Max MW-50 slots
\u003c= 0.75 6
\u003c= 1.00 8
\u003c= 1.50 10
\u003e 1.50 (or red = 0) 12

Admin Chat Commands

Command Arguments Example Action
ole ban \u003cucid\u003e ole ban A1B2C3D4 Blocks a UCID; schedules kick sweep in 15 s.
ole unban \u003cucid\u003e ole unban A1B2C3D4 Unblocks a UCID.
ole status none ole status Returns the current blocked list.
ole help none ole help Returns command usage hints.

Security note: Only the first word (ole) is checked. Messages beginning with the prefix are replaced by the response in the chat stream. Only players listed in CFG.admin_ucids can issue commands; when the whitelist is empty, anyone who knows the prefix can ban.

Files

Known Limitations

Changelog

v8.2

v8.1

v8 (original)