From 010f55071709684a9925eaf5124d3c998d4f4dc6 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sat, 18 Sep 2021 18:28:37 -0500 Subject: [PATCH] set sv_sayname on connection restore --- Application/IW4MServer.cs | 5 +++++ SharedLibraryCore/Server.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Application/IW4MServer.cs b/Application/IW4MServer.cs index b4485a33..525e4369 100644 --- a/Application/IW4MServer.cs +++ b/Application/IW4MServer.cs @@ -310,6 +310,11 @@ namespace IW4MAdmin Console.WriteLine(loc["MANAGER_CONNECTION_REST"].FormatExt($"[{IP}:{Port}]")); } + if (!string.IsNullOrEmpty(CustomSayName)) + { + await this.SetDvarAsync("sv_sayname", CustomSayName); + } + Throttled = false; } diff --git a/SharedLibraryCore/Server.cs b/SharedLibraryCore/Server.cs index 44c88895..9c056461 100644 --- a/SharedLibraryCore/Server.cs +++ b/SharedLibraryCore/Server.cs @@ -347,6 +347,6 @@ namespace SharedLibraryCore // only here for performance private readonly bool CustomSayEnabled; - private readonly string CustomSayName; + protected readonly string CustomSayName; } }