-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.inc.php
53 lines (34 loc) · 1.67 KB
/
init.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
require 'validate.inc.php';
$commands_disabled = array();
$commands_enabled = array();
require_once 'config.inc.php';
if ($_SESSION['sess_rcon_rights'] == 1)
{include_once 'config.access.full.inc.php';} else
{include_once 'config.access.limited.inc.php';}
include_once 'servers.inc.php';
// exclude servers belonging to other users
if (($match_user_and_server) && (count($servers)>0) && ($_SESSION['sess_rcon_user']!='admin'))
{
foreach ($servers as $n=>$v)
{
if (! (preg_match('`^[^ ]* '.preg_quote($_SESSION['sess_rcon_user'], '`').'`si', $v)==1))
{unset($servers[$n]);}
}
}
$server_id = (int) $_GET['server'];
list($game, $server_name, $server_friendly_name) = explode(' ',$servers[$server_id],3);
if ($server_friendly_name == '')
{$server_friendly_name = $server_name;}
if (is_file('games/'.$game.'.inc.php'))
include('games/'.$game.'.inc.php');
if (is_file('servers/'.$server_name.'.inc.php'))
include('servers/'.$server_name.'.inc.php');
if ((strlen($_SESSION['sess_rcon_lang'])>0) && (is_file('languages/'.$_SESSION['sess_rcon_lang'].'.inc.php')))
{$interface_language = $_SESSION['sess_rcon_lang'];}
include_once 'language.inc.php';
// set_time_limit(30); // maximum script execution time in seconds
$admin_name = $_SESSION['sess_rcon_user']; // used as a prefix of sent messages
$icons_only_default = array('clientkick','tell','say','pb_sv_kick','pb_sv_ban','banclient','tempbanclient','pb_sv_getss'); // list of commands which will be translated to icons if defaults should be used (other will remain as text by default)
$colwidth = 90; // width of columns to the left of playerlist
?>