diff --git a/src/ARKServerManager/Globalization/en-US/en-US.xaml b/src/ARKServerManager/Globalization/en-US/en-US.xaml index 7cd93176..0452bc8d 100644 --- a/src/ARKServerManager/Globalization/en-US/en-US.xaml +++ b/src/ARKServerManager/Globalization/en-US/en-US.xaml @@ -763,6 +763,9 @@ This message will be displayed when the server manager detects one or more mods are out of date. Force Respawn Dinos Warning: This message will be displayed when the server is being started and a wild dino wipe is scheduled. + + RCON Broadcast Mode: + Select the method used by the server manager to send auto process messages to the game clients via RCON. diff --git a/src/ARKServerManager/Lib/ServerApp.cs b/src/ARKServerManager/Lib/ServerApp.cs index 7cc162ca..120d0744 100644 --- a/src/ARKServerManager/Lib/ServerApp.cs +++ b/src/ARKServerManager/Lib/ServerApp.cs @@ -2319,6 +2319,23 @@ namespace ServerManagerTool.Lib return ModUtils.ValidateModList(modIdList); } + public static string GetMutexName(string directory) + { + using (var hashAlgo = MD5.Create()) + { + StringBuilder builder = new StringBuilder(); + + var hashStr = Encoding.UTF8.GetBytes(directory ?? Assembly.GetExecutingAssembly().Location); + var hash = hashAlgo.ComputeHash(hashStr); + foreach (var b in hash) + { + builder.Append(b.ToString("x2")); + } + + return builder.ToString(); + } + } + private static string GetProfileBackupFolder(ServerProfileSnapshot profile) { if (string.IsNullOrWhiteSpace(Config.Default.BackupPath)) @@ -2335,20 +2352,15 @@ namespace ServerManagerTool.Lib public static string GetProfileServerConfigDir(ServerProfileSnapshot profile) => Path.Combine(profile.InstallDirectory, Config.Default.ServerConfigRelativePath); - public static string GetMutexName(string directory) + private static string GetRconMessageCommand(string commandValue) { - using (var hashAlgo = MD5.Create()) + switch (commandValue.ToLower()) { - StringBuilder builder = new StringBuilder(); + case "global": + return ServerRCON.RCON_COMMAND_SERVERCHAT; - var hashStr = Encoding.UTF8.GetBytes(directory ?? Assembly.GetExecutingAssembly().Location); - var hash = hashAlgo.ComputeHash(hashStr); - foreach (var b in hash) - { - builder.Append(b.ToString("x2")); - } - - return builder.ToString(); + default: + return ServerRCON.RCON_COMMAND_BROADCAST; } } @@ -2669,7 +2681,7 @@ namespace ServerManagerTool.Lib if (string.IsNullOrWhiteSpace(message) || !SendMessages) return false; - var sent = await SendCommandAsync($"{Config.Default.RCON_MessageCommand.ToLower()} {message}", false); + var sent = await SendCommandAsync($"{GetRconMessageCommand(Config.Default.RCON_MessageCommand)} {message}", false); if (sent) { diff --git a/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml b/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml index 8daf7a14..91b8c4eb 100644 --- a/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml @@ -798,6 +798,11 @@ + + + diff --git a/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml.cs b/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml.cs index 70fbe388..3e062e76 100644 --- a/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml.cs +++ b/src/ARKServerManager/UserControls/GlobalSettingsControl.xaml.cs @@ -37,6 +37,7 @@ namespace ServerManagerTool public static readonly DependencyProperty WindowStatesServerMonitorProperty = DependencyProperty.Register(nameof(WindowStatesServerMonitor), typeof(ComboBoxItemList), typeof(GlobalSettingsControl), new PropertyMetadata(null)); public static readonly DependencyProperty DiscordBotLogLevelsProperty = DependencyProperty.Register(nameof(DiscordBotLogLevels), typeof(ComboBoxItemList), typeof(GlobalSettingsControl), new PropertyMetadata(null)); public static readonly DependencyProperty DiscordBotWhitelistProperty = DependencyProperty.Register(nameof(DiscordBotWhitelist), typeof(List), typeof(GlobalSettingsControl), new PropertyMetadata(null)); + public static readonly DependencyProperty RconMessageModesProperty = DependencyProperty.Register(nameof(RconMessageModes), typeof(ComboBoxItemList), typeof(GlobalSettingsControl), new PropertyMetadata(null)); public GlobalSettingsControl() { @@ -52,6 +53,7 @@ namespace ServerManagerTool PopulateWindowsStatesMainWindowComboBox(); PopulateWindowsStatesServerMonitorWindowComboBox(); PopulateDiscordBotLogLevelsComboBox(); + PopulateRconMessageModesComboBox(); DiscordBotWhitelist = new List(); if (Config.DiscordBotWhitelist != null) @@ -116,6 +118,12 @@ namespace ServerManagerTool set { SetValue(DiscordBotWhitelistProperty, value); } } + public ComboBoxItemList RconMessageModes + { + get { return (ComboBoxItemList)GetValue(RconMessageModesProperty); } + set { SetValue(RconMessageModesProperty, value); } + } + public void ApplyChangesToConfig() { if (Config.DiscordBotWhitelist is null) @@ -412,6 +420,7 @@ namespace ServerManagerTool PopulateWindowsStatesMainWindowComboBox(); PopulateWindowsStatesServerMonitorWindowComboBox(); + PopulateRconMessageModesComboBox(); App.Instance.OnResourceDictionaryChanged(Config.CultureName); } @@ -552,6 +561,27 @@ namespace ServerManagerTool } } + private void PopulateRconMessageModesComboBox() + { + var selectedValue = this.RconMessageModesComboBox?.SelectedValue ?? Config.RCON_MessageCommand; + var list = new ComboBoxItemList(); + + foreach (InputMode inputMode in Enum.GetValues(typeof(InputMode))) + { + if (inputMode == InputMode.Command) + continue; + + var displayMember = _globalizer.GetResourceString($"InputMode_{inputMode}") ?? inputMode.ToString(); + list.Add(new Common.Model.ComboBoxItem(inputMode.ToString(), displayMember)); + } + + this.RconMessageModes = list; + if (this.RconMessageModesComboBox != null) + { + this.RconMessageModesComboBox.SelectedValue = selectedValue; + } + } + #region Discord Bot Whitelist private void AddDiscordBotWhitelist_Click(object sender, RoutedEventArgs e) { diff --git a/src/ARKServerManager/VersionFeed.xml b/src/ARKServerManager/VersionFeed.xml index 8e20ada4..1f5cd058 100644 --- a/src/ARKServerManager/VersionFeed.xml +++ b/src/ARKServerManager/VersionFeed.xml @@ -7,6 +7,30 @@ 2022-05-02T00:00:00Z + + urn:uuid:2C48A585-72D2-43FB-8987-6B5F0B3E460F + 1.1.425 (1.1.425.1) + 1.1.425.1 + + 2022-05-06T00:00:00Z + +
+

+ CHANGE +
+

    +
  • Global Settings - added RCON broadcast mode droplist, so auto processes can send messages via RCON using this mode.
  • +
  • Auto Processes - changed the message broadcast to use the new config setting, not a hardcoded value.
  • +
+

+
+
+ + bletch + bletch1971@hotmail.com + +
+ urn:uuid:018EF426-73B9-4BF6-9602-77EE2CFD864C 1.1.424 (1.1.424.3) diff --git a/src/ARKServerManager/VersionFeedBeta.xml b/src/ARKServerManager/VersionFeedBeta.xml index 94b71494..8d39efcd 100644 --- a/src/ARKServerManager/VersionFeedBeta.xml +++ b/src/ARKServerManager/VersionFeedBeta.xml @@ -5,68 +5,22 @@ Ark Server Manager Version Feed This is the Ark Server Manager beta version feed. - 2022-05-02T00:00:00Z + 2022-05-06T00:00:00Z - urn:uuid:730AEAAD-1804-432C-8ABB-C0B970D86B23 - 1.1.424 (1.1.424.3) - 1.1.424.3 + urn:uuid:2C48A585-72D2-43FB-8987-6B5F0B3E460F + 1.1.425 (1.1.425.1) + 1.1.425.1 - 2022-05-02T00:00:00Z - -
-

- BUGFIX -
-

    -
  • Server Shutdown window - when shutting down a server, the Cancel Shutdown button is now displayed.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:9AC8F213-3411-475D-8E43-8AB67AF81BD8 - 1.1.424 (1.1.424.2) - 1.1.424.2 - - 2022-05-02T00:00:00Z + 2022-05-06T00:00:00Z

CHANGE

    -
  • pt-BR Translation file updated.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:018EF426-73B9-4BF6-9602-77EE2CFD864C - 1.1.424 (1.1.424.1) - 1.1.424.1 - - 2022-05-02T00:00:00Z - -
-

- CHANGE -
-

    -
  • World Save Backup - added the SaveGames folder to the to the backup zip file.
  • -
  • World Save Restore - now restores the SaveGames folder.
  • +
  • Global Settings - added RCON broadcast mode droplist, so auto processes can send messages via RCON using this mode.
  • +
  • Auto Processes - changed the message broadcast to use the new config setting, not a hardcoded value.

diff --git a/src/ConanServerManager/Lib/ServerApp.cs b/src/ConanServerManager/Lib/ServerApp.cs index fff67b01..f8bc60f7 100644 --- a/src/ConanServerManager/Lib/ServerApp.cs +++ b/src/ConanServerManager/Lib/ServerApp.cs @@ -2205,6 +2205,23 @@ namespace ServerManagerTool.Lib return ModUtils.ValidateModList(modIdList); } + public static string GetMutexName(string directory) + { + using (var hashAlgo = MD5.Create()) + { + StringBuilder builder = new StringBuilder(); + + var hashStr = Encoding.UTF8.GetBytes(directory ?? Assembly.GetExecutingAssembly().Location); + var hash = hashAlgo.ComputeHash(hashStr); + foreach (var b in hash) + { + builder.Append(b.ToString("x2")); + } + + return builder.ToString(); + } + } + private static string GetProfileBackupFolder(ServerProfileSnapshot profile) { if (string.IsNullOrWhiteSpace(Config.Default.BackupPath)) @@ -2221,20 +2238,18 @@ namespace ServerManagerTool.Lib public static string GetProfileServerConfigDir(ServerProfileSnapshot profile) => Path.Combine(profile.InstallDirectory, Config.Default.ServerConfigRelativePath); - public static string GetMutexName(string directory) + private static string GetRconMessageCommand(string commandValue) { - using (var hashAlgo = MD5.Create()) + switch (commandValue.ToLower()) { - StringBuilder builder = new StringBuilder(); + case "alert": + return ServerRcon.RCON_COMMAND_ALERT; - var hashStr = Encoding.UTF8.GetBytes(directory ?? Assembly.GetExecutingAssembly().Location); - var hash = hashAlgo.ComputeHash(hashStr); - foreach (var b in hash) - { - builder.Append(b.ToString("x2")); - } + case "server": + return ServerRcon.RCON_COMMAND_SERVER; - return builder.ToString(); + default: + return ServerRcon.RCON_COMMAND_BROADCAST; } } @@ -2563,7 +2578,7 @@ namespace ServerManagerTool.Lib if (string.IsNullOrWhiteSpace(message) || !SendMessages) return false; - var sent = await SendCommandAsync($"{Config.Default.RCON_MessageCommand.ToLower()} {message}", false); + var sent = await SendCommandAsync($"{GetRconMessageCommand(Config.Default.RCON_MessageCommand)} {message}", false); if (sent) { diff --git a/src/ConanServerManager/VersionFeed.xml b/src/ConanServerManager/VersionFeed.xml index 720c8750..14b06b6e 100644 --- a/src/ConanServerManager/VersionFeed.xml +++ b/src/ConanServerManager/VersionFeed.xml @@ -5,7 +5,30 @@ Conan Server Manager Version Feed This is the Conan Server Manager release version feed. - 2022-05-02T00:00:00Z + 2022-05-06T00:00:00Z + + + urn:uuid:AD8ABBB5-093A-4FDB-B473-FCED2DB46781 + 1.1.69 (1.1.69.1) + 1.1.69.1 + + 2022-05-06T00:00:00Z + +
+

+ BUGFIX +
+

    +
  • Fixed an issue that would not send through the auto process messages via RCON using the correct mode selected in the global settings.
  • +
+

+
+
+ + bletch + bletch1971@hotmail.com + +
urn:uuid:FF2C83B2-6D10-4217-A021-5B5F090FC480 diff --git a/src/ConanServerManager/VersionFeedBeta.xml b/src/ConanServerManager/VersionFeedBeta.xml index ab207643..703dba1a 100644 --- a/src/ConanServerManager/VersionFeedBeta.xml +++ b/src/ConanServerManager/VersionFeedBeta.xml @@ -5,45 +5,21 @@ Conan Server Manager Version Feed This is the Conan Server Manager beta version feed. - 2022-05-02T00:00:00Z + 2022-05-06T00:00:00Z - urn:uuid:FC1CF7D1-7CFC-41BD-A290-4F76EB6012E8 - 1.1.68 (1.1.68.2) - 1.1.68.2 + urn:uuid:AD8ABBB5-093A-4FDB-B473-FCED2DB46781 + 1.1.69 (1.1.69.1) + 1.1.69.1 - 2022-05-02T00:00:00Z + 2022-05-06T00:00:00Z

BUGFIX

    -
  • Server Shutdown window - when shutting down a server, the Cancel Shutdown button is now displayed.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:FF2C83B2-6D10-4217-A021-5B5F090FC480 - 1.1.68 (1.1.68.1) - 1.1.68.1 - - 2022-05-02T00:00:00Z - -
-

- CHANGE -
-

    -
  • World Save Backup - added the SaveGames folder to the to the backup zip file.
  • -
  • World Save Restore - now restores the SaveGames folder.
  • +
  • Fixed an issue that would not send through the auto process messages via RCON using the correct mode selected in the global settings.