mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Broadcast Message Changes
1. Added config option for auto processes to use broadcast keyword 2. Added config to global settings
This commit is contained in:
parent
220b3d9c77
commit
fc658b04dd
22 changed files with 196 additions and 55 deletions
|
|
@ -882,6 +882,9 @@
|
|||
<setting name="SectionServerDetailsIsExpanded" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="RCON_MessageCommand" serializeAs="String">
|
||||
<value>Broadcast</value>
|
||||
</setting>
|
||||
</ServerManagerTool.Config>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
|
|
|||
14
src/ARKServerManager/Config.Designer.cs
generated
14
src/ARKServerManager/Config.Designer.cs
generated
|
|
@ -12,7 +12,7 @@ namespace ServerManagerTool {
|
|||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
|
||||
public sealed partial class Config : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Config defaultInstance = ((Config)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Config())));
|
||||
|
|
@ -3126,5 +3126,17 @@ namespace ServerManagerTool {
|
|||
this["SectionServerDetailsIsExpanded"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Broadcast")]
|
||||
public string RCON_MessageCommand {
|
||||
get {
|
||||
return ((string)(this["RCON_MessageCommand"]));
|
||||
}
|
||||
set {
|
||||
this["RCON_MessageCommand"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -860,5 +860,8 @@
|
|||
<Setting Name="SectionServerDetailsIsExpanded" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="RCON_MessageCommand" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Broadcast</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
|
|
@ -2655,7 +2655,7 @@ namespace ServerManagerTool.Lib
|
|||
if (string.IsNullOrWhiteSpace(message) || !SendMessages)
|
||||
return false;
|
||||
|
||||
var sent = await SendCommandAsync($"{ServerRCON.RCON_COMMAND_BROADCAST} {message}", false);
|
||||
var sent = await SendCommandAsync($"{Config.Default.RCON_MessageCommand.ToLower()} {message}", false);
|
||||
|
||||
if (sent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -323,7 +323,8 @@ namespace ServerManagerTool.Lib
|
|||
command.suppressOutput = false;
|
||||
command.lines = HandleListPlayersCommand(command.lines);
|
||||
}
|
||||
else if (command.command.Equals(RCON_COMMAND_GETCHAT, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
if (command.command.Equals(RCON_COMMAND_GETCHAT, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// TODO: Extract the player name from the chat
|
||||
var lines = command.lines.Where(l => !string.IsNullOrEmpty(l) && l != NoResponseOutput);
|
||||
|
|
@ -342,12 +343,14 @@ namespace ServerManagerTool.Lib
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (command.command.Equals(RCON_COMMAND_BROADCAST, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
if (command.command.Equals(RCON_COMMAND_BROADCAST, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
LogEvent(LogEventType.Chat, command.rawCommand);
|
||||
command.suppressOutput = true;
|
||||
}
|
||||
else if (command.command.Equals(RCON_COMMAND_SERVERCHAT, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
if (command.command.Equals(RCON_COMMAND_SERVERCHAT, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
LogEvent(LogEventType.Chat, command.rawCommand);
|
||||
command.suppressOutput = true;
|
||||
|
|
|
|||
|
|
@ -1166,7 +1166,7 @@ namespace ServerManagerTool.Lib
|
|||
if (string.IsNullOrWhiteSpace(message))
|
||||
return false;
|
||||
|
||||
var sent = await SendCommandAsync($"{ServerRCON.RCON_COMMAND_BROADCAST} {message}", false);
|
||||
var sent = await SendCommandAsync($"{Config.Default.RCON_MessageCommand.ToLower()} {message}", false);
|
||||
|
||||
if (sent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,29 @@
|
|||
<link href="http://arkservermanager.freeforums.net/" />
|
||||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:95C9671F-4AEC-4433-AD68-CF91854FEC1B</id>
|
||||
<title>1.1.422 (1.1.422.1)</title>
|
||||
<summary>1.1.422.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
<content type="xhtml">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
|
||||
<p>
|
||||
<u style="font-size: .9em;">CHANGE</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Changed the auto process message broadcast to use a config setting, not a hardcoded value.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
<author>
|
||||
<name>bletch</name>
|
||||
<email>bletch1971@hotmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:B6B3F1F1-610F-4294-9891-43DD245A5E0A</id>
|
||||
<title>1.1.421 (1.1.421.1)</title>
|
||||
|
|
|
|||
|
|
@ -5,21 +5,21 @@
|
|||
<title>Ark Server Manager Version Feed</title>
|
||||
<subtitle>This is the Ark Server Manager beta version feed.</subtitle>
|
||||
<link href="http://arkservermanager.freeforums.net/" />
|
||||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
<updated>2022-03-23T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:B6B3F1F1-610F-4294-9891-43DD245A5E0A</id>
|
||||
<title>1.1.421 (1.1.421.1)</title>
|
||||
<summary>1.1.421.1</summary>
|
||||
<id>urn:uuid:95C9671F-4AEC-4433-AD68-CF91854FEC1B</id>
|
||||
<title>1.1.422 (1.1.422.1)</title>
|
||||
<summary>1.1.422.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
<updated>2022-03-23T00:00:00Z</updated>
|
||||
<content type="xhtml">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
|
||||
<p>
|
||||
<u style="font-size: .9em;">BUGFIX</u>
|
||||
<u style="font-size: .9em;">CHANGE</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Fixed a bug that would prevent auto processes from sending through broadcast messages to the clients.</li>
|
||||
<li>Changed the auto process message broadcast to use a config setting, not a hardcoded value.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ namespace ServerManagerTool
|
|||
execute: (_) =>
|
||||
{
|
||||
var message = _globalizer.GetResourceString("RCON_SaveWorldLabel");
|
||||
this.ServerRCON.IssueCommand($"{ServerRCON.RCON_COMMAND_BROADCAST} {message}");
|
||||
this.ServerRCON.IssueCommand($"{Config.Default.RCON_MessageCommand.ToLower()} {message}");
|
||||
|
||||
this.ServerRCON.IssueCommand(Config.Default.ServerSaveCommand);
|
||||
},
|
||||
|
|
@ -458,7 +458,7 @@ namespace ServerManagerTool
|
|||
execute: (_) =>
|
||||
{
|
||||
var message = _globalizer.GetResourceString("RCON_DestroyWildDinosLabel");
|
||||
this.ServerRCON.IssueCommand($"{ServerRCON.RCON_COMMAND_BROADCAST} {message}");
|
||||
this.ServerRCON.IssueCommand($"{Config.Default.RCON_MessageCommand.ToLower()} {message}");
|
||||
|
||||
this.ServerRCON.IssueCommand(ServerRCON.RCON_COMMAND_WILDDINOWIPE);
|
||||
},
|
||||
|
|
@ -801,6 +801,10 @@ namespace ServerManagerTool
|
|||
|
||||
switch (effectiveMode)
|
||||
{
|
||||
case InputMode.Command:
|
||||
this.ServerRCON.IssueCommand(commandText);
|
||||
break;
|
||||
|
||||
case InputMode.Broadcast:
|
||||
this.ServerRCON.IssueCommand($"{ServerRCON.RCON_COMMAND_BROADCAST} {commandText}");
|
||||
break;
|
||||
|
|
@ -815,16 +819,6 @@ namespace ServerManagerTool
|
|||
this.ServerRCON.IssueCommand($"{ServerRCON.RCON_COMMAND_SERVERCHAT} {commandText}");
|
||||
}
|
||||
break;
|
||||
|
||||
case InputMode.Command:
|
||||
this.ServerRCON.IssueCommand(commandText);
|
||||
break;
|
||||
|
||||
#if false
|
||||
case InputMode.Chat:
|
||||
this.ServerRCON.IssueCommand(textBox.Text);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue