Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit c8381b4

Browse files
committed
fixed RCON commands not working for remote servers (fix #115)
1 parent d0c78ee commit c8381b4

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

UI/MainWindow/MainWindowServerQuery.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ private void Server_Query()
2121
{
2222
var output = new List<string>();
2323

24-
if (!ServerIsRunning)
25-
{
26-
output.Add("No server running to send commands to.");
27-
goto Dispatcher;
28-
}
29-
3024
var c = Program.Configs[Program.SelectedConfig];
3125
if (string.IsNullOrWhiteSpace(c.RConIP) || string.IsNullOrWhiteSpace(c.RConCommands))
3226
{
@@ -89,13 +83,11 @@ private void Server_Query()
8983
switch ((SocketError)socketEx.ErrorCode)
9084
{
9185
case SocketError.ConnectionReset:
92-
output.Add("The connection was reset. Check your connection data and try again. You also could've been RCON banned for hacking attempts.");
93-
goto Dispatcher;
9486
case SocketError.NotConnected:
9587
case SocketError.TimedOut:
96-
output.Add("Connection to the server timed out. Make sure you've set it up correctly.\n" +
88+
output.Add("Connection to the server reset or timed out. Make sure you've set it up correctly, and the server you're targeting is available.\n" +
9789
"Your data:\n" +
98-
$" - IP: { c.RConIP}\n" +
90+
$" - IP: {c.RConIP}\n" +
9991
$" - Port: {c.RConPort}");
10092
goto Dispatcher;
10193
}

0 commit comments

Comments
 (0)