mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-04-29 16:25:49 +00:00
begin live server support
This commit is contained in:
parent
0c9ddb476a
commit
e4ae265184
368 changed files with 17756 additions and 7738 deletions
|
|
@ -14,9 +14,9 @@ $Authentication::Settings::Timeout = 30000;
|
|||
|
||||
function AuthenticationInterface::onLine(%this, %line)
|
||||
{
|
||||
//warn(%line);
|
||||
if (isEventPending($Authentication::TransactionCompletionSchedule))
|
||||
cancel($Authentication::TransactionCompletionSchedule);
|
||||
|
||||
$Authentication::TransactionCompletionSchedule = schedule(700, 0, Authentication_transactionComplete);
|
||||
|
||||
if ($Authentication::Status::ActiveMode != 0)
|
||||
|
|
@ -102,8 +102,12 @@ function Authentication_transactionComplete()
|
|||
}
|
||||
else if (getWord(%buffer, 0) $= "CERT:")
|
||||
{
|
||||
$Authentication::Status::LastCert = getRecord(%buffer, 0);
|
||||
$Authentication::Status::LastExp = getRecord(%buffer, 1);
|
||||
%cert = getSubStr(%buffer, 0, strstr(%buffer, "\n"));
|
||||
%buffer = getSubStr(%buffer, strstr(%buffer, "\n") + 1, strlen(%buffer));
|
||||
%exp = getSubStr(%buffer, 0, (strstr(%buffer, "\n") == -1 ? strlen(%buffer) : strstr(%buffer, "\n")));
|
||||
|
||||
$Authentication::Status::LastCert = %cert;
|
||||
$Authentication::Status::LastExp = %exp;
|
||||
echo("Authentication: Successfully downloaded certificate and encrypted key.");
|
||||
}
|
||||
else
|
||||
|
|
@ -163,7 +167,6 @@ function Authentication_checkAvail()
|
|||
|
||||
if (isObject(AuthenticationInterface))
|
||||
AuthenticationInterface.delete();
|
||||
|
||||
new TCPObject(AuthenticationInterface);
|
||||
|
||||
AuthenticationInterface.data = "AVAIL\n";
|
||||
|
|
@ -185,7 +188,6 @@ function Authentication_checkName(%name)
|
|||
|
||||
if (isObject(AuthenticationInterface))
|
||||
AuthenticationInterface.delete();
|
||||
|
||||
new TCPObject(AuthenticationInterface);
|
||||
|
||||
AuthenticationInterface.data = "NAME\t" @ %name @ "\n";
|
||||
|
|
@ -207,7 +209,6 @@ function Authentication_recoverAccount(%payload)
|
|||
|
||||
if (isObject(AuthenticationInterface))
|
||||
AuthenticationInterface.delete();
|
||||
|
||||
new TCPObject(AuthenticationInterface);
|
||||
|
||||
AuthenticationInterface.data = "RECOVER\t" @ %payload @ "\n";
|
||||
|
|
@ -229,11 +230,9 @@ function Authentication_registerAccount(%payload)
|
|||
|
||||
if (isObject(AuthenticationInterface))
|
||||
AuthenticationInterface.delete();
|
||||
|
||||
new TCPObject(AuthenticationInterface);
|
||||
|
||||
AuthenticationInterface.data = "SIGN\t" @ %payload @ "\n";
|
||||
|
||||
AuthenticationInterface.connect($AuthServer::Address);
|
||||
$Authentication::TransactionCompletionSchedule = schedule($Authentication::Settings::Timeout, 0, Authentication_transactionComplete);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue