This repository has been archived by the owner on Feb 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
limiter-config.php
196 lines (152 loc) · 5.34 KB
/
limiter-config.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<?php
/**
* Weapon Limiter
*
* Configuration File
*
* Console script for Battlefield Play4Free community.
* Kicks players with forbidden weapons like shotguns on selected server.
*
* @category BFP4F
* @package limiter
* @author piqus <ovirendo@gmail.com>
* @license MIT http://opensource.org/licenses/MIT
* @version 0.3
* @link https://github.com/piqus/bfp4f-limiter
*/
/* Environment Configuration
***************************/
ini_set('max_execution_time', 20);
date_default_timezone_set('Europe/London');
// Load composer vendors
define('VENDOR_DIR', __DIR__ . '/vendor');
/* Load Classes for COMPOSER
***************************/
require_once VENDOR_DIR.'/autoload.php';
//# or if you don't have composer #//
// foreach (glob("src/T4G/BFP4F/Rcon/*.php") as $class)
// {
// require_once $class;
// }
/* Connect to DB
********************/
define('DB_TYPE', 'mysql');
define('DB_HOST', 'localhost');
define('DB_PORT', '3306');
define('DB_USER', 'root');
define('DB_PASS', 'password');
define('DB_NAME', 'limiter');
if (DB_TYPE=="mongodb") {
require_once __DIR__ . '/DB-mongo.php';
} else {
require_once __DIR__ . '/DB-pdosql.php';
}
$db = new DB();
/* Limiter Configuration
***********************/
$configs = array(
/* ------------------------------------
* GENERAL
* ------------------------------------
*/
// Server IP
'general.server_ip' => "127.0.0.1",
//Server PORT
'general.server_port' => (int) 1337,
// Server PASSWORD
'general.server_password' => "rcon_password",
// Is a whole script enabled (force disable script)?
'general.script_enabled' => true,
// Ignore VIPs
'general.ignore_vips' => false,
// Ignore selected player to check their weapon slots?
'general.ignored_players_enabled' => false,
// List of ignored players
// # Profile IDs spearated by commas
// # Use strings (values in quotes) instead of numeric
'general.ignored_players' => array(
"2627733530",
),
/* ------------------------------------
* DATABASE
* ------------------------------------
*/
// Collection/Table of Logs
'db.colLogs' => 'logs',
// Collection/Table of Cache
'db.colCache' => 'cache',
/* ------------------------------------
* WEAPON LIMITER SCRIPT
* ------------------------------------
* + Weapon Limiter
* + Prebuy Limiter
*/
// Kick for carrying disallowed weapon
'weaponLimiter.weapon_limiter_enabled' => true,
// Which weapons are disallowed on server
// # You may find IDs of weapon in (vendor/piqus/bfp4f-rcon/)src/T4G/BFP4F/Rcon/Support.php
'weaponLimiter.weapon_limiter_restricted_guns' => array(
3048, // MG36
3120, // FAMAS
),
// Kick for prebuy?
'weaponLimiter.prebuy_limiter_enabled' => true,
// Which weapons are checking for prebuy thingie
'weaponLimiter.prebuy_limiter_restricted_guns' => array(
3127, // L85A2
3128, // PKP PECHENEG
3122, // AS-VAL
),
// If selected player was kicked how long (in minutes) he won't be able to rejoin server
'weaponLimiter.cache_threshold' => (int) 15,
// Custom Autokick Message
// # %player% - person managed to leave, soldier name
// # %weapon% - found gun which violates Weapon or Prebuy Limiter
// # %type% - "Prebuy Limiter" or "Weapon Limiter"
// # %script% - "Prebuy Limiter" or "Weapon Limiter"
// # %level% - soldier level
// # %kit% - soldier class
'weaponLimiter.custom_message' => "%player% you are being autokicked (%script% - %weapon%)",
/* ------------------------------------
* LEVEL LIMITER SCRIPT
* ------------------------------------
*/
// Enable Level Limiter?
'levelLimiter.script_enabled' => true,
// Kick soldiers below X level (not equal)
// # -1 to disable
// # 0 to kick -1 glitchers
'levelLimiter.kick_below_level' => (int) 0,
// Kick soldiers above X level (not equal)
// # 30 to disable
'levelLimiter.kick_above_level' => (int) 30,
// Custom Autokick Message
// # %player% - person managed to leave, soldier name
// # %type% - "Below" or "Above"
// # %script% - "Level Limiter"
// # %level% - soldier level
// # %kit% - soldier class
// # Note: You may concatenate required levels using . (dot) operator.
'levelLimiter.custom_message' => "%player% you are being autokicked (level required: 0-30)",
/* ------------------------------------
* CLASS LIMITER SCRIPT
* ------------------------------------
*/
// Enable Class Limiter?
'classLimiter.script_enabled' => false,
// How many assaults can be on server per one team?
'classLimiter.max_assaults' => (int) 16,
// How many engineers can be on server per one team?
'classLimiter.max_engineers' => (int) 16,
// How many medics can be on server per one team?
'classLimiter.max_medics' => (int) 16,
// How many recons can be on server per one team?
'classLimiter.max_recons' => (int) 16,
// Custom Autokick Message
// # %player% - person managed to leave, soldier name
// # %script% - "Class Limiter"
// # %level% - soldier level
// # %kit% - soldier class
'classLimiter.custom_message' => "%player% you are being autokicked (%script%; %kit%)",
);
?>