Client telemetry

This commit is contained in:
erik 2025-05-24 21:10:45 +02:00
parent f4ec57a44d
commit a0f40cf2cd
5 changed files with 466 additions and 8 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Linq;
@ -73,6 +74,7 @@ namespace MosswartMassacre
_inventoryLogger = new MossyInventory();
}
catch (Exception ex)
{
@ -140,7 +142,7 @@ namespace MosswartMassacre
Telemetry.Start();
if (WebSocketEnabled)
WebSocket.Start();
}
@ -235,8 +237,10 @@ namespace MosswartMassacre
{
Decal_DispatchOnChatCommand("/vt setmetastate loot_rare");
}
DelayedCommandManager.AddDelayedCommand($"/a {rareText}", 3000);
// Fire and forget: we don't await, since sending is not critical and we don't want to block.
_ = WebSocket.SendRareAsync(rareText);
}
if (e.Color == 18 && e.Text.EndsWith("!report\""))
@ -521,7 +525,8 @@ namespace MosswartMassacre
WriteToChat("/mm http - Local http-command server enable|disable");
WriteToChat("/mm remotecommand - Listen to allegiance !do/!dot enable|disable");
WriteToChat("/mm getmetastate - Gets the current metastate");
WriteToChat("/TESTAR");
break;
case "report":