Skynet Killfeed - server-side mod for DayZ PC
=============================================

Sends your server's admin log (the same lines DayZ writes to
DayZServer_x64.ADM) to killfeed.com, where the Skynet killfeed bot reads it
exactly as it reads an Xbox or PlayStation log. Every 20 seconds it also
reports who is online (name, Steam id), the server's frame rate, the in-game
clock and the weather, and runs the commands queued on your PC dashboard
(https://killfeed.com/pc/dashboard): a message to everybody online, a kick,
the time of day, the weather, a teleport. The dashboard's In-game tab sets
what players see on screen: an in-game killfeed ("Nikolai killed Vasily -
M4-A1 - 120 m", with or without the killer's name), a welcome message a
little after each player connects, and announcements on timers; a change
there reaches the server with its next report, nothing to restart.
Every report also names the mods the server loaded (folder, name, version),
so the dashboard's Mods tab can tell a mod that is on disk from one that is
really loaded. Server-side only: players never download it. Nothing is sent
but the admin log's lines and that report; no positions ever leave the
server.

Works on any host that lets you add a server mod, and on your own machine.

The easy way: on https://killfeed.com/pc-servers open your server's "Install
the mod" page. With your host's FTP details killfeed.com uploads the mod and
its config.json for you and tells you what is left; without FTP the same
page walks you through the steps below. This file is the same guide as
https://killfeed.com/pc-servers/mod, for reading offline.

1. On https://killfeed.com/pc-servers, add your server and press "Make a key".
   Copy the config.json it shows (or download it).
2. Put the mod on the server:
   - Nitrado (its panel has no server-mods field): upload only
     addons/SkynetKillfeed.pbo from this zip into the server's own addons
     folder, dayzstandalone/addons/, next to the game's PBOs. That is how
     Nitrado's guide installs a server-side mod. Nothing goes in a keys
     folder and nothing in "Additional Mods".
   - Other hosts and your own machine: put the whole @SkynetKillfeed folder
     next to DayZServer_x64.exe, where other mods go, through the panel's
     file manager or FTP.
3. Put config.json into your server's profiles folder, under SkynetKillfeed:
      <profiles>/SkynetKillfeed/config.json
   (the profiles folder is the one you pass as -profiles= when the server
   starts; the mod writes a blank config.json there on its first start if you
   forget, and says so in the RPT).
4. Load it:
   - Nitrado: nothing to add. The server loads what is in its addons folder.
     Make sure @SkynetKillfeed is NOT in Settings, General, "Additional
     Mods": a mod there is a client mod, so the server tells every player to
     have it, and nobody can join without its key. Nitrado's guide notes the
     launcher still lists the mod to players joining, who pick Ignore.
   - Other hosts: add @SkynetKillfeed to the "server mods" field. On your own
     machine, add it to the start parameters as a SERVER mod:
        -serverMod=@SkynetKillfeed
     (several server mods are separated with ;). Never the plain mods field.
5. Restart the server. The RPT log shows a line starting [SkynetKillfeed]
   saying it is sending, then "Skynet accepted the first batch" once the
   first lines land; killfeed.com/pc-servers shows them arriving.

config.json
-----------
  {
    "url": "https://killfeed.com",
    "serverId": 900000001,
    "key": "skpc_900000001_...",
    "flushSeconds": 5,
    "stateSeconds": 20,
    "commands": true,
    "verbose": false
  }

  stateSeconds  how often the live report goes (10..120). 0 switches reports
                and commands off: the killfeed still works, the dashboard
                shows nobody online and runs nothing, and the In-game tab's
                killfeed, welcome message and announcements never arrive.
  commands      false keeps the reports but refuses every command from the
                dashboard (each is marked failed there, with this reason).

The admin log only holds kills when serverDZ.cfg has these on:
  adminLogPlayerHitsOnly = 0;
  adminLogPlacement = 1;
  adminLogBuildActions = 1;
  adminLogPlayerList = 1;

If sending fails the mod keeps the lines for a while and says why in the RPT
(the first failure, then every tenth):
  Send error 5   Skynet refused it: the serverId or key in config.json is not
                 the one on killfeed.com/pc-servers. Make a new key there (the
                 old one stops working) and put it in config.json.
  Send error 6   killfeed.com answered with a server error (down, restarting,
                 busy). Nothing to change; it retries.
  Send error 7   No connection to killfeed.com at all. Not the key: the host
                 allows no connections out, DNS failed, or the site demands a
                 TLS version this machine cannot speak (killfeed.com must
                 accept TLS 1.2; the install page says whether it does).
  timed out      The request left and nothing came back in time.
When it gets through again the RPT says so. Do not also run the Skynet PC
agent for the same server: every line would arrive twice.
