Browse Source

Add minimum client version check code

Skylar Ittner 2 years ago
parent
commit
5aa60659bd
2 changed files with 14 additions and 0 deletions
  1. 12
    0
      minclientversion.php
  2. 2
    0
      settings.template.php

+ 12
- 0
minclientversion.php View File

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

+ 2
- 0
settings.template.php View File

@@ -16,6 +16,8 @@ define("PDB_USER", "");
16 16
 define("PDB_PASS", "");
17 17
 define("PDB_CHARSET", "latin1");
18 18
 
19
+define("MIN_CLIENT_VERSION", "1.5.2");
20
+
19 21
 define("GEOCACHE_KEY", "");
20 22
 define("MUNZEE_KEY", "");
21 23
 define("MUNZEE_SECRET", "");

Loading…
Cancel
Save