mirror of
https://github.com/TribesNext/t2-scripts.git
synced 2026-01-19 18:14:43 +00:00
Fixed T2 crash when running in Listen mode
This commit is contained in:
parent
aa9d6c9c74
commit
f2764e41e0
|
|
@ -290,6 +290,12 @@ function t2csri_processDownloadCompletion()
|
|||
function t2csri_gameServerHexAddress()
|
||||
{
|
||||
%ip = ServerConnection.getAddress();
|
||||
|
||||
// DarkDragonDX: Fix listen server crashes because .getAddress() returns
|
||||
// "local" when in listen
|
||||
if (trim(%ip) $= "local")
|
||||
%ip = "IP:127.0.0.1:" @ $Host::Port; // Build the local IP ourselves
|
||||
|
||||
%ip = getSubStr(%ip, strstr(%ip, ":") + 1, strlen(%ip));
|
||||
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
|
||||
%ip = strReplace(%ip, ".", " ");
|
||||
|
|
|
|||
|
|
@ -56,6 +56,12 @@ function serverCmdt2csri_sendCertChunk(%client, %chunk)
|
|||
function t2csri_gameClientHexAddress(%client)
|
||||
{
|
||||
%ip = %client.getAddress();
|
||||
|
||||
// DarkDragonDX: Fix listen server crashes because .getAddress() returns
|
||||
// "local" when in listen
|
||||
if (trim(%ip) $= "local")
|
||||
%ip = "IP:127.0.0.1:" @ $Host::Port; // Just build the local IP
|
||||
|
||||
%ip = getSubStr(%ip, strstr(%ip, ":") + 1, strlen(%ip));
|
||||
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
|
||||
%ip = strReplace(%ip, ".", " ");
|
||||
|
|
@ -291,7 +297,7 @@ package t2csri_server
|
|||
// clan support will be implemented via delegation to a community server
|
||||
function GameConnection::getAuthInfo(%client)
|
||||
{
|
||||
if (%client.getAddress() $= "Local" && %client.t2csri_authInfo $= "")
|
||||
if (trim(%client.getAddress()) $= "local" && %client.t2csri_authInfo $= "")
|
||||
%client.t2csri_authInfo = WONGetAuthInfo();
|
||||
return %client.t2csri_authInfo;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue