mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-07-08 21:50:02 -07:00
add functionality for grabbing userid
This commit is contained in:
parent
a776a47d56
commit
8656d9dad4
@ -13,7 +13,9 @@
|
|||||||
private const string GameTeleportingEntry = "[FLog::SingleSurfaceApp] initiateTeleport";
|
private const string GameTeleportingEntry = "[FLog::SingleSurfaceApp] initiateTeleport";
|
||||||
private const string GameMessageEntry = "[FLog::Output] [BloxstrapRPC]";
|
private const string GameMessageEntry = "[FLog::Output] [BloxstrapRPC]";
|
||||||
private const string GameLeavingEntry = "[FLog::SingleSurfaceApp] leaveUGCGameInternal";
|
private const string GameLeavingEntry = "[FLog::SingleSurfaceApp] leaveUGCGameInternal";
|
||||||
|
private const string GameJoinLoadTimeEntry = "[FLog::GameJoinLoadTime] Report game_join_loadtime:"
|
||||||
|
|
||||||
|
private const string GameJoinLoadTimeEntryPattern = ", userid:([0-9]+)"
|
||||||
private const string GameJoiningEntryPattern = @"! Joining game '([0-9a-f\-]{36})' place ([0-9]+) at ([0-9\.]+)";
|
private const string GameJoiningEntryPattern = @"! Joining game '([0-9a-f\-]{36})' place ([0-9]+) at ([0-9\.]+)";
|
||||||
private const string GameJoiningUDMUXPattern = @"UDMUX Address = ([0-9\.]+), Port = [0-9]+ \| RCC Server Address = ([0-9\.]+), Port = [0-9]+";
|
private const string GameJoiningUDMUXPattern = @"UDMUX Address = ([0-9\.]+), Port = [0-9]+ \| RCC Server Address = ([0-9\.]+), Port = [0-9]+";
|
||||||
private const string GameJoinedEntryPattern = @"serverId: ([0-9\.]+)\|[0-9]+";
|
private const string GameJoinedEntryPattern = @"serverId: ([0-9\.]+)\|[0-9]+";
|
||||||
@ -39,6 +41,7 @@
|
|||||||
public bool ActivityInGame = false;
|
public bool ActivityInGame = false;
|
||||||
public long ActivityPlaceId = 0;
|
public long ActivityPlaceId = 0;
|
||||||
public string ActivityJobId = "";
|
public string ActivityJobId = "";
|
||||||
|
public string ActivityUserId = "";
|
||||||
public string ActivityMachineAddress = "";
|
public string ActivityMachineAddress = "";
|
||||||
public bool ActivityMachineUDMUX = false;
|
public bool ActivityMachineUDMUX = false;
|
||||||
public bool ActivityIsTeleport = false;
|
public bool ActivityIsTeleport = false;
|
||||||
@ -143,6 +146,19 @@
|
|||||||
process.CloseMainWindow();
|
process.CloseMainWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ActivityUserId == "" && entry.Contains(GameJoinLoadTimeEntry))
|
||||||
|
{
|
||||||
|
Match match = Regex.Match(entry, GameJoinLoadTimeEntryPattern);
|
||||||
|
|
||||||
|
if (match.Groups.Count != 2)
|
||||||
|
{
|
||||||
|
App.Logger.WriteLine(LOG_IDENT, $"Failed to assert format for game join load time entry");
|
||||||
|
App.Logger.WriteLine(LOG_IDENT, entry);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ActivityUserId = match.Groups[1].Value
|
||||||
|
}
|
||||||
if (!ActivityInGame && ActivityPlaceId == 0)
|
if (!ActivityInGame && ActivityPlaceId == 0)
|
||||||
{
|
{
|
||||||
if (entry.Contains(GameJoiningPrivateServerEntry))
|
if (entry.Contains(GameJoiningPrivateServerEntry))
|
||||||
@ -229,7 +245,8 @@
|
|||||||
ActivityMachineUDMUX = false;
|
ActivityMachineUDMUX = false;
|
||||||
ActivityIsTeleport = false;
|
ActivityIsTeleport = false;
|
||||||
ActivityServerType = ServerType.Public;
|
ActivityServerType = ServerType.Public;
|
||||||
|
ActivityUserId = ""
|
||||||
|
|
||||||
OnGameLeave?.Invoke(this, new EventArgs());
|
OnGameLeave?.Invoke(this, new EventArgs());
|
||||||
}
|
}
|
||||||
else if (entry.Contains(GameTeleportingEntry))
|
else if (entry.Contains(GameTeleportingEntry))
|
||||||
|
Loading…
Reference in New Issue
Block a user