Create a vacbanreporter.json
file in your DayZ server's profile directory. An
example file can be downloaded from
here.
The "maxBanAgeDays"
property determines the maximum VAC ban age, in days, that
will be reported. VAC bans that are older than this value will be ignored. Example:
{ "maxBanAgeDays": 99999 }
The default is 2561 days, or roughly 7 years.
The "cacheTTL"
property determines the number of seconds that VAC check results
will be kept in memory, thereby reducing the number of API requests that are necessary for
checking player statuses.
{ "cacheTTL": 7200 }
The default is 3600 seconds.
The "banFile"
property can contain a filename where ban lines should be written.
The file will be appended to every time a VAC ban is detected. Omit or leave blank to disable
writing bans to a file.
Note that DayZ forbids mods from writing to the ban.txt file directly. To work around this, create a hardlink in a writable directory. For example, if using CMD.EXE:
mklink /H <profile-dir>\ban.txt ban.txt
Or, if using PowerShell:
New-Item -ItemType HardLink -Path <profile-dir>\ban.txt -Target ban.txt
You can then point your banFile at the hardlink:
{ "banFile": "$profile:ban.txt" }
When the "enableNotification"
property is set to true, all connected players
will receive an in-game notification when a VAC banned player is detected. Example:
{ "enableNotification": true }
When the "enableDebug"
property is set to true, a dummy VAC ban will be reported
on every player connect. This is really only useful for testing webhooks. Example:
{ "enableDebug": true }
Note: You do not want to enable this setting under normal circumstances!
The "webhooks"
property can contain a list of zero or more webhook
configurations for sending remote notifications whenever VAC bans are detected. Basic
example:
{ "webhooks": [ { "name": "My Discord Server", "type": "discord", "url": "https://discord.com/api/webhooks/0123456789012345678/6e623d2f33b228a5fd609cb08863ecb537caff85241fc80a9069be9182aa4b10", "messagePrefix": "@here" } ] }
Multiple webhooks may be configured if you want VAC ban notifications to be sent to more than one destination. For example:
{ "webhooks": [ { "name": "My Discord Server", "type": "discord", "url": "https://discord.com/api/webhooks/0123456789012345678/6e623d2f33b228a5fd609cb08863ecb537caff85241fc80a9069be9182aa4b10", "messagePrefix": "@here" }, { "name": "Bob's Discord Server", "type": "discord", "url": "https://discord.com/api/webhooks/8765432109876543210/6bdcd7cca5e8cfb6b4273d6ec3efad1ceaa9e973f3d595cd9803a2b10bd2bd4e", "messagePrefix": "@admins" }, { "name": "My Custom HTTP Server", "type": "custom", "url": "http://localhost:8080/vac" } ] }
Use the "name"
property to uniquely identify this webhook in logs, which can be
helpful for pinpointing errors.
Use the "type"
property to identify what type of webhook this is. Currently only
"custom"
and "discord"
are supported. This property is required.
The "discord"
type should be used to send VAC ban notifications to a Discord
channel.
The "custom"
type may be used to send VAC ban notifications to a custom web
server. Notifications will be sent as POST
requests with the following
JSON-encoded structure in the request body:
{ "version": 1, "name": "Player Name", "plainId": "STEAMID", "age": 1234, "banLine": "STEAMID // Player Name - VAC banned, age: 1234 days (YYYY-MM-DD)" }
The "url"
property should contain the URL of the webhook endpoint that should
receive VAC ban notifications. This property is required.
The "messagePrefix"
property can be used to define text that is to be prepended
to all VAC ban notifications sent to a Discord webhook. This can be used to tag specific
users or roles. This property is ignored by other webhook types.