Added client 11 and above restriction to login webservice (#414)

* Added client 11 and above restriction to login webservice
This commit is contained in:
Evil Puncker 2020-06-01 17:41:31 -03:00 committed by GitHub
parent b99cf6fd3e
commit 8d959350d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -643,6 +643,7 @@
);
// Gameserver info is used for client 11+ loginWebService
$config['login_web_service'] = true; // loginWebService for client 11+ enabled?
$config['gameserver'] = array(
'ip' => '127.0.0.1',
'port' => 7172,

View File

@ -2,7 +2,7 @@
require_once 'engine/init.php';
// Client 11 loginWebService
if($_SERVER['HTTP_USER_AGENT'] == "Mozilla/5.0" && $config['ServerEngine'] === 'TFS_10') {
if($_SERVER['HTTP_USER_AGENT'] == "Mozilla/5.0" && $config['ServerEngine'] === 'TFS_10' && $config['login_web_service'] == true) {
function jsonError($message, $code = 3) {
die(json_encode(array('errorCode' => $code, 'errorMessage' => $message)));