mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Fixed a bug that would prevent auto processes from sending through broadcast messages to the clients.
This commit is contained in:
parent
8d84f67bd9
commit
9d4d49560e
12 changed files with 107 additions and 78 deletions
|
|
@ -27,7 +27,7 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
public int RCONPort { get; set; }
|
||||
|
||||
public string AdminPassword { get; set; }
|
||||
public string RCONPassword { get; set; }
|
||||
|
||||
public int MaxPlayers
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2550,6 +2550,18 @@ namespace ServerManagerTool.Lib
|
|||
Debug.WriteLine($"[INFO] (Branch {GetBranchName(branchName) ?? "unknown"}) {message}");
|
||||
}
|
||||
|
||||
private void LogProfileDebug(string message, bool includeProgressCallback = true)
|
||||
{
|
||||
message = message ?? string.Empty;
|
||||
|
||||
_loggerProfile?.Debug(message);
|
||||
|
||||
if (includeProgressCallback)
|
||||
ProgressCallback?.Invoke(0, $"{message}");
|
||||
|
||||
Debug.WriteLine($"[DEBUG] (Profile {_profile?.ProfileName ?? "unknown"}) {message}");
|
||||
}
|
||||
|
||||
private void LogProfileError(string error, bool includeProgressCallback = true)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(error))
|
||||
|
|
@ -2721,37 +2733,27 @@ namespace ServerManagerTool.Lib
|
|||
var server = QueryMaster.ServerQuery.GetServerInstance(QueryMaster.EngineType.Source, endPoint, sendTimeOut: 10000, receiveTimeOut: 10000);
|
||||
if (server == null)
|
||||
{
|
||||
#if DEBUG
|
||||
LogProfileMessage($"FAILED: {nameof(SetupRconConsole)} - ServerQuery could not be created.", false);
|
||||
#endif
|
||||
LogProfileDebug($"FAILED: {nameof(SetupRconConsole)} - ServerQuery could not be created.", false);
|
||||
return;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
LogProfileMessage($"SUCCESS: {nameof(SetupRconConsole)} - ServerQuery was created.", false);
|
||||
#endif
|
||||
LogProfileDebug($"SUCCESS: {nameof(SetupRconConsole)} - ServerQuery was created.", false);
|
||||
|
||||
Task.Delay(1000).Wait();
|
||||
|
||||
_rconConsole = server.GetControl(_profile.AdminPassword);
|
||||
_rconConsole = server.GetControl(_profile.RCONPassword);
|
||||
if (_rconConsole == null)
|
||||
{
|
||||
#if DEBUG
|
||||
LogProfileMessage($"FAILED: {nameof(SetupRconConsole)} - RconConsole could not be created ({_profile.AdminPassword}).", false);
|
||||
#endif
|
||||
LogProfileDebug($"FAILED: {nameof(SetupRconConsole)} - RconConsole could not be created ({_profile.RCONPassword}).", false);
|
||||
return;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
LogProfileMessage($"SUCCESS: {nameof(SetupRconConsole)} - RconConsole was created ({_profile.AdminPassword}).", false);
|
||||
#endif
|
||||
LogProfileDebug($"SUCCESS: {nameof(SetupRconConsole)} - RconConsole was created ({_profile.RCONPassword}).", false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
#if DEBUG
|
||||
LogProfileMessage($"ERROR: {nameof(SetupRconConsole)}\r\n{ex.Message}", false);
|
||||
LogProfileMessage($"ERROR: {nameof(SetupRconConsole)}\r\n{ex.StackTrace}", false);
|
||||
#endif
|
||||
LogProfileDebug($"ERROR: {nameof(SetupRconConsole)}\r\n{ex.Message}", false);
|
||||
LogProfileDebug($"ERROR: {nameof(SetupRconConsole)}\r\n{ex.StackTrace}", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,13 @@ namespace ServerManagerTool.Lib
|
|||
public int QueryPort;
|
||||
public bool RCONEnabled;
|
||||
public int RCONPort;
|
||||
public string RCONPassword;
|
||||
public string ServerMap;
|
||||
public string ServerMapModId;
|
||||
public string TotalConversionModId;
|
||||
public IEnumerable<string> ServerModIds;
|
||||
public string MOTD;
|
||||
public int MotDDuration;
|
||||
public int MOTDDuration;
|
||||
public bool MOTDIntervalEnabled;
|
||||
public int MOTDInterval;
|
||||
public bool ForceRespawnDinos;
|
||||
|
|
@ -75,12 +76,13 @@ namespace ServerManagerTool.Lib
|
|||
QueryPort = profile.QueryPort,
|
||||
RCONEnabled = profile.RCONEnabled,
|
||||
RCONPort = profile.RCONPort,
|
||||
RCONPassword = profile.AdminPassword,
|
||||
ServerMap = ServerProfile.GetProfileMapName(profile),
|
||||
ServerMapModId = ServerProfile.GetProfileMapModId(profile),
|
||||
TotalConversionModId = profile.TotalConversionModId ?? string.Empty,
|
||||
ServerModIds = ModUtils.GetModIdList(profile.ServerModIds),
|
||||
MOTD = profile.MOTD,
|
||||
MotDDuration = Math.Max(profile.MOTDDuration, 10),
|
||||
MOTDDuration = Math.Max(profile.MOTDDuration, 10),
|
||||
MOTDIntervalEnabled = profile.MOTDInterval.HasValue && !string.IsNullOrWhiteSpace(profile.MOTD),
|
||||
MOTDInterval = Math.Max(1, Math.Min(int.MaxValue, profile.MOTDInterval.Value)),
|
||||
ForceRespawnDinos = profile.ForceRespawnDinos,
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
var endpoint = new IPEndPoint(this.rconParams.RCONHostIP, this.rconParams.RCONPort);
|
||||
var server = QueryMaster.ServerQuery.GetServerInstance(QueryMaster.EngineType.Source, endpoint);
|
||||
this.console = server.GetControl(this.rconParams.AdminPassword);
|
||||
this.console = server.GetControl(this.rconParams.RCONPassword);
|
||||
return this.console != null;
|
||||
}
|
||||
|
||||
|
|
@ -473,7 +473,7 @@ namespace ServerManagerTool.Lib
|
|||
}
|
||||
|
||||
this.maxCommandRetries = 10;
|
||||
_errorLogger.Error($"Failed to connect to RCON at {this.rconParams.RCONHostIP}:{this.rconParams.RCONPort} with {this.rconParams.AdminPassword}. {lastException.Message}");
|
||||
_errorLogger.Error($"Failed to connect to RCON at {this.rconParams.RCONHostIP}:{this.rconParams.RCONPort} with {this.rconParams.RCONPassword}. {lastException.Message}");
|
||||
throw new Exception($"Command failed to send after {maxCommandRetries} attempts. Last exception: {lastException.Message}", lastException);
|
||||
}
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -1113,7 +1113,7 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
Task.Delay(1000).Wait();
|
||||
|
||||
_rconConsole = server.GetControl(this.ProfileSnapshot.AdminPassword);
|
||||
_rconConsole = server.GetControl(this.ProfileSnapshot.RCONPassword);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,9 +7,32 @@
|
|||
<link href="http://arkservermanager.freeforums.net/" />
|
||||
<updated>2022-03-22T00: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>
|
||||
<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;">BUGFIX</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Fixed a bug that would prevent auto processes from sending through broadcast messages to the clients.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
<author>
|
||||
<name>bletch</name>
|
||||
<email>bletch1971@hotmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:344B5D20-74E5-484C-A548-200A4ADAE3A2</id>
|
||||
<title>1.1.419 (1.1.420.1)</title>
|
||||
<title>1.1.420 (1.1.420.1)</title>
|
||||
<summary>1.1.420.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:344B5D20-74E5-484C-A548-200A4ADAE3A2</id>
|
||||
<title>1.1.419 (1.1.420.1)</title>
|
||||
<summary>1.1.420.1</summary>
|
||||
<id>urn:uuid:B6B3F1F1-610F-4294-9891-43DD245A5E0A</id>
|
||||
<title>1.1.421 (1.1.421.1)</title>
|
||||
<summary>1.1.421.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
<content type="xhtml">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<u style="font-size: .9em;">BUGFIX</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Fixed the issue where the Dino Tame settings would be reset when opening the server manager.</li>
|
||||
<li>Fixed a bug that would prevent auto processes from sending through broadcast messages to the clients.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace ServerManagerTool
|
|||
ProfileId = $"{ServerIP}-{RCONPort}".Replace(".", "-"),
|
||||
RCONHost = ServerIP,
|
||||
RCONPort = RCONPort,
|
||||
AdminPassword = Password,
|
||||
RCONPassword = Password,
|
||||
InstallDirectory = String.Empty,
|
||||
AltSaveDirectoryName = String.Empty,
|
||||
PGM_Enabled = false,
|
||||
|
|
|
|||
|
|
@ -659,7 +659,6 @@ namespace ServerManagerTool
|
|||
PlayerListWidth = server.Profile.RCONPlayerListWidth,
|
||||
|
||||
Server = server,
|
||||
AdminPassword = server.Runtime.ProfileSnapshot.AdminPassword,
|
||||
InstallDirectory = server.Runtime.ProfileSnapshot.InstallDirectory,
|
||||
AltSaveDirectoryName = server.Runtime.ProfileSnapshot.AltSaveDirectoryName,
|
||||
ProfileId = server.Runtime.ProfileSnapshot.ProfileId,
|
||||
|
|
@ -667,6 +666,7 @@ namespace ServerManagerTool
|
|||
MaxPlayers = server.Runtime.MaxPlayers,
|
||||
RCONHost = server.Runtime.ProfileSnapshot.ServerIPAddress.ToString(),
|
||||
RCONPort = server.Runtime.ProfileSnapshot.RCONPort,
|
||||
RCONPassword = server.Runtime.ProfileSnapshot.RCONPassword,
|
||||
|
||||
PGM_Enabled = server.Profile.PGM_Enabled,
|
||||
PGM_Name = server.Profile.PGM_Name,
|
||||
|
|
|
|||
|
|
@ -2443,6 +2443,18 @@ namespace ServerManagerTool.Lib
|
|||
Debug.WriteLine($"[INFO] (Branch {GetBranchName(branchName) ?? "unknown"}) {message}");
|
||||
}
|
||||
|
||||
private void LogProfileDebug(string message, bool includeProgressCallback = true)
|
||||
{
|
||||
message = message ?? string.Empty;
|
||||
|
||||
_loggerProfile?.Debug(message);
|
||||
|
||||
if (includeProgressCallback)
|
||||
ProgressCallback?.Invoke(0, $"{message}");
|
||||
|
||||
Debug.WriteLine($"[DEBUG] (Profile {_profile?.ProfileName ?? "unknown"}) {message}");
|
||||
}
|
||||
|
||||
private void LogProfileError(string error, bool includeProgressCallback = true)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(error))
|
||||
|
|
@ -2614,37 +2626,27 @@ namespace ServerManagerTool.Lib
|
|||
var server = QueryMaster.ServerQuery.GetServerInstance(QueryMaster.EngineType.Source, endPoint, sendTimeOut: 10000, receiveTimeOut: 10000);
|
||||
if (server == null)
|
||||
{
|
||||
#if DEBUG
|
||||
LogProfileMessage($"FAILED: {nameof(SetupRconConsole)} - ServerQuery could not be created.", false);
|
||||
#endif
|
||||
LogProfileDebug($"FAILED: {nameof(SetupRconConsole)} - ServerQuery could not be created.", false);
|
||||
return;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
LogProfileMessage($"SUCCESS: {nameof(SetupRconConsole)} - ServerQuery was created.", false);
|
||||
#endif
|
||||
LogProfileDebug($"SUCCESS: {nameof(SetupRconConsole)} - ServerQuery was created.", false);
|
||||
|
||||
Task.Delay(1000).Wait();
|
||||
|
||||
_rconConsole = server.GetControl(_profile.AdminPassword);
|
||||
_rconConsole = server.GetControl(_profile.RconPassword);
|
||||
if (_rconConsole == null)
|
||||
{
|
||||
#if DEBUG
|
||||
LogProfileMessage($"FAILED: {nameof(SetupRconConsole)} - RconConsole could not be created ({_profile.AdminPassword}).", false);
|
||||
#endif
|
||||
LogProfileDebug($"FAILED: {nameof(SetupRconConsole)} - RconConsole could not be created ({_profile.RconPassword}).", false);
|
||||
return;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
LogProfileMessage($"SUCCESS: {nameof(SetupRconConsole)} - RconConsole was created ({_profile.AdminPassword}).", false);
|
||||
#endif
|
||||
LogProfileDebug($"SUCCESS: {nameof(SetupRconConsole)} - RconConsole was created ({_profile.RconPassword}).", false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
#if DEBUG
|
||||
LogProfileMessage($"ERROR: {nameof(SetupRconConsole)}\r\n{ex.Message}", false);
|
||||
LogProfileMessage($"ERROR: {nameof(SetupRconConsole)}\r\n{ex.StackTrace}", false);
|
||||
#endif
|
||||
LogProfileDebug($"ERROR: {nameof(SetupRconConsole)}\r\n{ex.Message}", false);
|
||||
LogProfileDebug($"ERROR: {nameof(SetupRconConsole)}\r\n{ex.StackTrace}", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,30 @@
|
|||
<title>Conan Server Manager Version Feed</title>
|
||||
<subtitle>This is the Conan Server Manager release version feed.</subtitle>
|
||||
<link href="http://servermanagers.freeforums.net/" />
|
||||
<updated>2022-03-03T00:00:00Z</updated>
|
||||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:674D8E81-FB1B-42D9-8309-41AE40D5192F</id>
|
||||
<title>1.1.64 (1.1.64.1)</title>
|
||||
<summary>1.1.64.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;">BUGFIX</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Fixed a bug that would prevent auto processes from sending through broadcast messages to the clients.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
<author>
|
||||
<name>bletch</name>
|
||||
<email>bletch1971@hotmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:C6DE07B3-ADA8-4AE4-BFE4-1F87CDFF6284</id>
|
||||
|
|
|
|||
|
|
@ -5,44 +5,21 @@
|
|||
<title>Conan Server Manager Version Feed</title>
|
||||
<subtitle>This is the Conan Server Manager beta version feed.</subtitle>
|
||||
<link href="http://servermanagers.freeforums.net/" />
|
||||
<updated>2022-03-03T00:00:00Z</updated>
|
||||
<updated>2022-03-22T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:C6DE07B3-ADA8-4AE4-BFE4-1F87CDFF6284</id>
|
||||
<title>1.1.63 (1.1.63.2)</title>
|
||||
<summary>1.1.63.2</summary>
|
||||
<id>urn:uuid:674D8E81-FB1B-42D9-8309-41AE40D5192F</id>
|
||||
<title>1.1.64 (1.1.64.1)</title>
|
||||
<summary>1.1.64.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-03-03T00:00:00Z</updated>
|
||||
<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>
|
||||
<u style="font-size: .9em;">BUGFIX</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Misc. Language File Updates.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
<author>
|
||||
<name>bletch</name>
|
||||
<email>bletch1971@hotmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:C6DE07B3-ADA8-4AE4-BFE4-1F87CDFF6284</id>
|
||||
<title>1.1.63 (1.1.63.1)</title>
|
||||
<summary>1.1.63.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-03-02T00: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>Branch Details moved to new Server Details section, easier to perform profile sync.</li>
|
||||
<li>Fixed a bug that would prevent auto processes from sending through broadcast messages to the clients.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue