diff --git a/Dockerfile b/Dockerfile index 169ec52..0a18f83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base +FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["VPLink/VPLink.csproj", "VPLink/"] RUN dotnet restore "VPLink/VPLink.csproj" @@ -14,8 +14,8 @@ RUN dotnet publish "VPLink.csproj" -c Release -o /app/publish FROM base AS vpsdk WORKDIR /vpsdk -ADD http://static.virtualparadise.org/dev-downloads/vpsdk_20231217_422bcbfc_linux_debian10_x86_64.tar.gz ./vpsdk.tar.gz -RUN echo "5F5710EEFC1FC2C5246434A52B9DC05F477A6EFE91394001FAA4097F5CA7BC77 vpsdk.tar.gz" | sha256sum -c -&& \ +ADD http://edwin-share.virtualparadise.org/2024/01/vpsdk_20240102_e6701b5e_linux_debian10_x86_64 ./vpsdk.tar.gz +RUN echo "5784270749FFC3AD31EFF9BA7DD82203C31968C60DD732A4F76CBB2947C1DB6D vpsdk.tar.gz" | sha256sum -c -&& \ tar xfv vpsdk.tar.gz --strip-components=1 && \ rm -r vpsdk.tar.gz include diff --git a/VPLink.Common/VPLink.Common.csproj b/VPLink.Common/VPLink.Common.csproj index d052804..796fad4 100644 --- a/VPLink.Common/VPLink.Common.csproj +++ b/VPLink.Common/VPLink.Common.csproj @@ -1,13 +1,13 @@ - net7.0 + net8.0 enable enable - + diff --git a/VPLink.Tests/VPLink.Tests.csproj b/VPLink.Tests/VPLink.Tests.csproj index 1c1233e..d9a563d 100644 --- a/VPLink.Tests/VPLink.Tests.csproj +++ b/VPLink.Tests/VPLink.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable false @@ -11,11 +11,11 @@ - - - + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/VPLink/Services/VirtualParadiseMessageService.cs b/VPLink/Services/VirtualParadiseMessageService.cs index 48f0117..c730b01 100644 --- a/VPLink/Services/VirtualParadiseMessageService.cs +++ b/VPLink/Services/VirtualParadiseMessageService.cs @@ -43,6 +43,8 @@ internal sealed class VirtualParadiseMessageService : BackgroundService, IVirtua /// public Task SendMessageAsync(RelayedMessage message) { + if (_virtualParadiseClient.CurrentWorld is null) return Task.CompletedTask; + IChatConfiguration configuration = _configurationService.VirtualParadiseConfiguration.Chat; Color color = Color.FromArgb((int)(message.IsReply ? configuration.ReplyColor : configuration.Color)); @@ -62,6 +64,7 @@ internal sealed class VirtualParadiseMessageService : BackgroundService, IVirtua private void OnVPMessageReceived(VirtualParadiseMessage message) { if (message is null) throw new ArgumentNullException(nameof(message)); + if (_virtualParadiseClient.CurrentWorld is null) return; if (message.Type != MessageType.ChatMessage) return; if (message.Author == _virtualParadiseClient.CurrentAvatar) return; if (message.Author.IsBot && !_configurationService.BotConfiguration.RelayBotMessages) return; diff --git a/VPLink/VPLink.csproj b/VPLink/VPLink.csproj index cf34467..9620466 100644 --- a/VPLink/VPLink.csproj +++ b/VPLink/VPLink.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable Linux @@ -37,12 +37,12 @@ - - + + - + diff --git a/global.json b/global.json index 36e1a9e..b5b37b6 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.0", + "version": "8.0.0", "rollForward": "latestMajor", "allowPrerelease": false }