mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Remove ping stats from server notifier
This commit is contained in:
parent
f8dd388f88
commit
add07a1c71
@ -39,25 +39,12 @@ namespace Bloxstrap.Integrations
|
||||
if (String.IsNullOrEmpty(locationCountry))
|
||||
message = "Location: N/A";
|
||||
else if (locationCity == locationRegion)
|
||||
message = $"Location: {locationRegion}, {locationCountry}\n";
|
||||
message = $"Location: {locationRegion}, {locationCountry}";
|
||||
else
|
||||
message = $"Location: {locationCity}, {locationRegion}, {locationCountry}\n";
|
||||
message = $"Location: {locationCity}, {locationRegion}, {locationCountry}";
|
||||
|
||||
// UDMUX protected servers don't respond to ICMP packets and so the ping fails
|
||||
// we could probably get around this by doing a UDP latency test but ehhhhhhhh
|
||||
if (_activityWatcher.ActivityMachineUDMUX)
|
||||
{
|
||||
message += "Latency: N/A (Server is UDMUX protected)";
|
||||
}
|
||||
else
|
||||
{
|
||||
PingReply ping = await new Ping().SendPingAsync(machineAddress);
|
||||
|
||||
if (ping.Status == IPStatus.Success)
|
||||
message += $"Latency: ~{ping.RoundtripTime}ms";
|
||||
else
|
||||
message += $"Latency: N/A (Code {ping.Status})";
|
||||
}
|
||||
message += "\nServer is UDMUX protected";
|
||||
|
||||
App.Logger.WriteLine($"[ServerNotifier::Notify] {message.ReplaceLineEndings("\\n")}");
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
<TextBlock FontSize="14" Text="Show server details of current game" />
|
||||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Be notified of useful server details (e.g. location and ping) whenever you join a game." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
|
||||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Be notified of useful server details whenever you join a game." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
|
||||
</StackPanel>
|
||||
</ui:CardControl.Header>
|
||||
<ui:ToggleSwitch IsChecked="{Binding ShowServerDetailsEnabled, Mode=TwoWay}" />
|
||||
|
Loading…
Reference in New Issue
Block a user