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
|
|
@ -27,8 +27,9 @@ namespace ServerManagerTool
|
|||
public enum InputMode
|
||||
{
|
||||
Command,
|
||||
//Global,
|
||||
Broadcast,
|
||||
Alert,
|
||||
Server,
|
||||
}
|
||||
|
||||
public enum InputWindowMode
|
||||
|
|
@ -633,12 +634,20 @@ namespace ServerManagerTool
|
|||
|
||||
switch (effectiveMode)
|
||||
{
|
||||
case InputMode.Command:
|
||||
this.ServerRcon.IssueCommand(commandText);
|
||||
break;
|
||||
|
||||
case InputMode.Broadcast:
|
||||
this.ServerRcon.IssueCommand($"{ServerRcon.RCON_COMMAND_BROADCAST} {commandText}");
|
||||
break;
|
||||
|
||||
case InputMode.Command:
|
||||
this.ServerRcon.IssueCommand(commandText);
|
||||
case InputMode.Alert:
|
||||
this.ServerRcon.IssueCommand($"{ServerRcon.RCON_COMMAND_ALERT} {commandText}");
|
||||
break;
|
||||
|
||||
case InputMode.Server:
|
||||
this.ServerRcon.IssueCommand($"{ServerRcon.RCON_COMMAND_SERVER} {commandText}");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -737,6 +746,14 @@ namespace ServerManagerTool
|
|||
{
|
||||
yield return new RconOutput_Broadcast(command.args);
|
||||
}
|
||||
else if(command.command.Equals(ServerRcon.RCON_COMMAND_ALERT, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
yield return new RconOutput_Broadcast(command.args);
|
||||
}
|
||||
else if(command.command.Equals(ServerRcon.RCON_COMMAND_SERVER, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
yield return new RconOutput_Broadcast(command.args);
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return new RconOutput_Command($"> {command.rawCommand}");
|
||||
|
|
|
|||
|
|
@ -71,20 +71,7 @@
|
|||
|
||||
<cctl:AnnotatedSlider Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="1" Label="{DynamicResource ShutdownWindow_ShutdownIntervalLabel}" Value="{Binding ShutdownInterval}" Minimum="0" Maximum="60" SmallChange="1" LargeChange="5" TickFrequency="1" LabelRelativeWidth="Auto" SliderRelativeWidth="15*" SuffixRelativeWidth="Auto" Suffix="{DynamicResource SliderUnits_Minutes}" IsEnabled="{Binding ShutdownStarted, Converter={StaticResource InvertBooleanConverter}}" ToolTip="{DynamicResource ShutdownWindow_ShutdownIntervalTooltip}"/>
|
||||
|
||||
<CheckBox Grid.Row="2" Grid.Column="0" Margin="5" Content="{DynamicResource ShutdownWindow_BackupWorldFileLabel}" IsChecked="{Binding BackupWorldFile}" IsEnabled="{Binding ShutdownStarted, Converter={StaticResource InvertBooleanConverter}}" ToolTip="{DynamicResource ShutdownWindow_BackupWorldFileTooltip}" HorizontalAlignment="Left">
|
||||
<CheckBox.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type CheckBox}}" TargetType="{x:Type CheckBox}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Server.Profile.SOTF_Enabled}" Value="True">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Server.Profile.SOTF_Enabled}" Value="False">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
<CheckBox Grid.Row="2" Grid.Column="0" Margin="5" Content="{DynamicResource ShutdownWindow_BackupWorldFileLabel}" IsChecked="{Binding BackupWorldFile}" IsEnabled="{Binding ShutdownStarted, Converter={StaticResource InvertBooleanConverter}}" ToolTip="{DynamicResource ShutdownWindow_BackupWorldFileTooltip}" HorizontalAlignment="Left"/>
|
||||
<CheckBox Grid.Row="2" Grid.Column="1" Margin="5" Content="{DynamicResource ShutdownWindow_UpdateServerLabel}" IsChecked="{Binding UpdateServer}" IsEnabled="{Binding ShutdownStarted, Converter={StaticResource InvertBooleanConverter}}" ToolTip="{DynamicResource ShutdownWindow_UpdateServerTooltip}" HorizontalAlignment="Left"/>
|
||||
|
||||
<CheckBox Grid.Row="3" Grid.Column="0" Margin="5" Content="{DynamicResource ShutdownWindow_RestartServerLabel}" IsChecked="{Binding RestartServer}" IsEnabled="{Binding ShutdownStarted, Converter={StaticResource InvertBooleanConverter}}" ToolTip="{DynamicResource ShutdownWindow_RestartServerTooltip}" HorizontalAlignment="Left"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue