Fix U+031F funnies

This commit is contained in:
Natsumi
2021-12-08 06:43:31 +13:00
parent a83f33fed4
commit 6d9400a64c
2 changed files with 7 additions and 14 deletions

View File

@@ -406,35 +406,29 @@ namespace VRCX
// 2021.06.23 11:41:16 Log - [Behaviour] Initialized PlayerAPI "Natsumi-sama" is local
if (line.Contains("] Initialized PlayerAPI \""))
if (line.Contains("] OnPlayerJoined"))
{
var lineOffset = line.LastIndexOf("] Initialized PlayerAPI \"");
var lineOffset = line.LastIndexOf("] OnPlayerJoined");
if (lineOffset < 0)
return false;
lineOffset += 25;
lineOffset += 17;
var pos = line.LastIndexOf("\" is ");
if (pos < 0)
return false;
var userType = line.Substring(pos + 5);
var userDisplayName = line.Substring(lineOffset, pos - lineOffset);
var userDisplayName = line.Substring(lineOffset);
AppendLog(new[]
{
fileInfo.Name,
ConvertLogTimeToISO8601(line),
"player-joined",
userDisplayName,
userType,
userDisplayName
});
return true;
}
if (line.Contains("] OnPlayerLeft "))
if (line.Contains("] OnPlayerLeft") && !line.Contains("] OnPlayerLeftRoom"))
{
var lineOffset = line.LastIndexOf("] OnPlayerLeft ");
var lineOffset = line.LastIndexOf("] OnPlayerLeft");
if (lineOffset < 0)
return false;
lineOffset += 15;

View File

@@ -19,7 +19,6 @@ class GameLogService {
case 'player-joined':
gameLog.userDisplayName = args[0];
gameLog.userType = args[1];
break;
case 'player-left':