Skip to content

Commit

Permalink
Merge pull request #5 from cleantted/fix/vrchat2021.1.2_logging_bug
Browse files Browse the repository at this point in the history
VRChat 2021.1.2のアップデートでログが壊れた不具合の暫定対応
  • Loading branch information
nukora authored Feb 5, 2021
2 parents c4a225c + d844f4c commit 03e5e73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions VRChatActivityLogger/VRChatActivityLogger/RegexPatterns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ static RegexPatterns()
string receivedRequestInvite = header + @"Received Message of type: notification content:.+""type"":""requestInvite"".+$";
string sendInvite = header + @"Send notification:.+type:invite.+$";
string sendRequestInvite = header + @"Send notification:.+type:requestInvite.+$";
string joinedRoom1 = header + @"\[RoomManager\] Joining w.+$";
string joinedRoom2 = header + @"\[RoomManager\] Joining or Creating Room:.+$";
string metPlayer = header + @"\[Player\] Initialized PlayerAPI.+$";
string joinedRoom1 = header + @"\[(RoomManager|[DŽDž]*)\] Joining w.+$";
string joinedRoom2 = header + @"\[(RoomManager|[DŽDž]*)\] Joining or Creating Room:.+$";
string metPlayer = header + @"\[(Player|[DŽDž]*)\] Initialized PlayerAPI.+$";
string sendFriendRequest = header + @"Send notification:.+type:friendRequest.+$";
string receivedFriendRequest = header + @"Received Message of type: notification content:.+""type"":""friendRequest"".+$";
string acceptFriendRequest = header + @"AcceptFriendRequest.+$";
Expand All @@ -79,9 +79,9 @@ static RegexPatterns()
string receivedRequestInviteDetail = detailHeader + @"Received Message of type: notification content: ({{.+}}) received at";
string sendInviteDetail = detailHeader + @".+to (.{40}) of.+worldId=(.+), worldName=(.+)}},";
string sendRequestInviteDetail = detailHeader + @".+to (.{40}) of";
string metPlayerDetail = detailHeader + @"\[Player\] Initialized PlayerAPI ""(.*)"" is (remote|local)$";
string joinedRoom1Detail = detailHeader + @"\[RoomManager\] Joining (.+)$";
string joinedRoom2Detail = detailHeader + @"\[RoomManager\] Joining or Creating Room: (.+)$";
string metPlayerDetail = detailHeader + @"\[(Player|[DŽDž]*)\] Initialized PlayerAPI ""(.*)"" is (remote|local)$";
string joinedRoom1Detail = detailHeader + @"\[(RoomManager|[DŽDž]*)\] Joining (.+)$";
string joinedRoom2Detail = detailHeader + @"\[(RoomManager|[DŽDž]*)\] Joining or Creating Room: (.+)$";
string sendFriendRequestDetail = detailHeader + @".+to (.{40}) of";
string receivedFriendRequestDetail = detailHeader + @"Received Message of type: notification content: ({{.+}}) received at";
string acceptFriendRequestDetail = detailHeader + @".+username:(.+), sender user id:(.{40}).+id: (.{40}),";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,15 @@ private List<ActivityLog> ParseVRChatLog(string filePath)
{
ActivityType = ActivityType.JoinedRoom,
Timestamp = DateTime.Parse(m.Groups[1].Value),
WorldID = m.Groups[2].Value,
WorldID = m.Groups[3].Value,
});
}
else if (match.Groups[PatternType.JoinedRoom2].Value.Length != 0)
{
var m = RegexPatterns.JoinedRoom2Detail.Match(match.ToString());
if (activityLogs.Any() && activityLogs[activityLogs.Count - 1].ActivityType == ActivityType.JoinedRoom)
{
activityLogs[activityLogs.Count - 1].WorldName = m.Groups[2].Value;
activityLogs[activityLogs.Count - 1].WorldName = m.Groups[3].Value;
}
else
{
Expand All @@ -238,7 +238,7 @@ private List<ActivityLog> ParseVRChatLog(string filePath)
{
ActivityType = ActivityType.MetPlayer,
Timestamp = DateTime.Parse(m.Groups[1].Value),
UserName = m.Groups[2].Value,
UserName = m.Groups[3].Value,
});
}
else if (match.Groups[PatternType.SendFriendRequest].Value.Length != 0)
Expand Down

0 comments on commit 03e5e73

Please sign in to comment.