Browse Source

Add minimum client version check code

master
Skylar Ittner 5 years ago
parent
commit
5aa60659bd
  1. 12
      minclientversion.php
  2. 2
      settings.template.php

12
minclientversion.php

@ -0,0 +1,12 @@
<?php
/*
* Give the minimum allowed game client version. The client should check on
* startup and not continue if its version is less than the given version.
*/
require 'settings.php';
header('Content-Type: application/json');
header("Access-Control-Allow-Origin: *");
echo json_encode(["status" => "OK", "version" => MIN_CLIENT_VERSION]);

2
settings.template.php

@ -16,6 +16,8 @@ define("PDB_USER", "");
define("PDB_PASS", "");
define("PDB_CHARSET", "latin1");
define("MIN_CLIENT_VERSION", "1.5.2");
define("GEOCACHE_KEY", "");
define("MUNZEE_KEY", "");
define("MUNZEE_SECRET", "");