mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Lua file: RevScriptSys LoginWebService for protocol 11, 12+
Move file to this location: data/scripts/znote_login.lua And restart OT server, it should auto load script. This script will help Znote AAC connect players to your game server.
This commit is contained in:
25
login.php
25
login.php
@@ -139,7 +139,30 @@ if($_SERVER['HTTP_USER_AGENT'] == "Mozilla/5.0" && $config['ServerEngine'] === '
|
||||
if ($players !== false) {
|
||||
|
||||
$gameserver = $config['gameserver'];
|
||||
// todo: Fix dynamic desition to pass along token. (and verify that it works). Hostname: otx11.lan
|
||||
// Override $config['gameserver'] if server has installed Lua script for loginWebService
|
||||
$sql_elements = mysql_select_multi("
|
||||
SELECT
|
||||
`key`,
|
||||
`value`
|
||||
FROM `znote_global_storage`
|
||||
WHERE `key` IN('SERVER_NAME', 'IP', 'GAME_PORT')
|
||||
");
|
||||
if ($sql_elements !== false) {
|
||||
foreach ($sql_elements AS $element) {
|
||||
switch ($element['key']) {
|
||||
case 'SERVER_NAME':
|
||||
$gameserver['name'] = $element['value'];
|
||||
break;
|
||||
case 'IP':
|
||||
$gameserver['ip'] = $element['value'];
|
||||
break;
|
||||
case 'GAME_PORT':
|
||||
$gameserver['port'] = (int)$element['value'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sessionKey = $username."\n".$client->password;
|
||||
if (isset($account['secret']) && strlen($account['secret']) > 5) $sessionKey .= "\n".$token."\n".floor(time() / 30);
|
||||
|
||||
|
Reference in New Issue
Block a user