Пример #1
0
 private void RconCloseSaveWorld(bool AllServers)
 {
     if (AllServers || ServerList.FocusedItem != null)
     {
         if (AllServers)
         {
             SourceRconTools.SendCommandToAll("DoExit");
         }
         else
         {
             ArkServerListViewItem ASLVI = (ArkServerListViewItem)ServerList.FocusedItem;
             SourceRconTools.SendCommand("DoExit", ASLVI);
         }
         Log("Closed Saved World!");
     }
 }
Пример #2
0
 private void RconPlugin(bool AllServers, bool Load)
 {
     if (AllServers || ServerList.FocusedItem != null)
     {
         ArkServerListViewItem ASLVI = AllServers ? null : (ArkServerListViewItem)ServerList.FocusedItem;
         inputDialog.Text            = (Load ? "Load" : "Unload") + " Plugin to " + (AllServers ? "All" : ASLVI.GetServerData().AltSaveDirectory);
         inputDialog.SendButton.Text = (Load ? "Load" : "Unload") + " Plugin";
         if (inputDialog.ShowDialog() == DialogResult.OK)
         {
             if (AllServers)
             {
                 SourceRconTools.SendCommandToAll("plugins." + (Load ? "load " : "unload ") + inputDialog.InputText.Text);
             }
             else
             {
                 SourceRconTools.SendCommand("plugins." + (Load ? "load " : "unload ") + inputDialog.InputText.Text, ASLVI);
             }
             Log("Plugin " + (Load ? "Loaded" : "Unloaded") + ": " + inputDialog.InputText.Text);
         }
     }
 }
Пример #3
0
 private void RconCustomCommand(bool AllServers)
 {
     if (AllServers || ServerList.FocusedItem != null)
     {
         ArkServerListViewItem ASLVI = AllServers ? null : (ArkServerListViewItem)ServerList.FocusedItem;
         inputDialog.Text            = "Send Custom Command to " + (AllServers ? "All" : ASLVI.GetServerData().AltSaveDirectory);
         inputDialog.SendButton.Text = "Send Command";
         if (inputDialog.ShowDialog() == DialogResult.OK)
         {
             if (AllServers)
             {
                 SourceRconTools.SendCommandToAll(inputDialog.InputText.Text);
             }
             else
             {
                 SourceRconTools.SendCommand(inputDialog.InputText.Text, ASLVI);
             }
             Log("Custom Command Executed: " + inputDialog.InputText.Text);
         }
     }
 }