mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
RCON Broadcast Mode
- Added RCON broadcast mode selection to ASM global settings. - Added new Mode selection method to ServerApp, so the correct command is used.
This commit is contained in:
parent
35d8153236
commit
dc830c602c
9 changed files with 149 additions and 107 deletions
|
|
@ -2205,6 +2205,23 @@ namespace ServerManagerTool.Lib
|
|||
return ModUtils.ValidateModList(modIdList);
|
||||
}
|
||||
|
||||
public static string GetMutexName(string directory)
|
||||
{
|
||||
using (var hashAlgo = MD5.Create())
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
var hashStr = Encoding.UTF8.GetBytes(directory ?? Assembly.GetExecutingAssembly().Location);
|
||||
var hash = hashAlgo.ComputeHash(hashStr);
|
||||
foreach (var b in hash)
|
||||
{
|
||||
builder.Append(b.ToString("x2"));
|
||||
}
|
||||
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetProfileBackupFolder(ServerProfileSnapshot profile)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Config.Default.BackupPath))
|
||||
|
|
@ -2221,20 +2238,18 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
public static string GetProfileServerConfigDir(ServerProfileSnapshot profile) => Path.Combine(profile.InstallDirectory, Config.Default.ServerConfigRelativePath);
|
||||
|
||||
public static string GetMutexName(string directory)
|
||||
private static string GetRconMessageCommand(string commandValue)
|
||||
{
|
||||
using (var hashAlgo = MD5.Create())
|
||||
switch (commandValue.ToLower())
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
case "alert":
|
||||
return ServerRcon.RCON_COMMAND_ALERT;
|
||||
|
||||
var hashStr = Encoding.UTF8.GetBytes(directory ?? Assembly.GetExecutingAssembly().Location);
|
||||
var hash = hashAlgo.ComputeHash(hashStr);
|
||||
foreach (var b in hash)
|
||||
{
|
||||
builder.Append(b.ToString("x2"));
|
||||
}
|
||||
case "server":
|
||||
return ServerRcon.RCON_COMMAND_SERVER;
|
||||
|
||||
return builder.ToString();
|
||||
default:
|
||||
return ServerRcon.RCON_COMMAND_BROADCAST;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2563,7 +2578,7 @@ namespace ServerManagerTool.Lib
|
|||
if (string.IsNullOrWhiteSpace(message) || !SendMessages)
|
||||
return false;
|
||||
|
||||
var sent = await SendCommandAsync($"{Config.Default.RCON_MessageCommand.ToLower()} {message}", false);
|
||||
var sent = await SendCommandAsync($"{GetRconMessageCommand(Config.Default.RCON_MessageCommand)} {message}", false);
|
||||
|
||||
if (sent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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-05-02T00:00:00Z</updated>
|
||||
<updated>2022-05-06T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:AD8ABBB5-093A-4FDB-B473-FCED2DB46781</id>
|
||||
<title>1.1.69 (1.1.69.1)</title>
|
||||
<summary>1.1.69.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-05-06T00: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 an issue that would not send through the auto process messages via RCON using the correct mode selected in the global settings.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
<author>
|
||||
<name>bletch</name>
|
||||
<email>bletch1971@hotmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:FF2C83B2-6D10-4217-A021-5B5F090FC480</id>
|
||||
|
|
|
|||
|
|
@ -5,45 +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-05-02T00:00:00Z</updated>
|
||||
<updated>2022-05-06T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:FC1CF7D1-7CFC-41BD-A290-4F76EB6012E8</id>
|
||||
<title>1.1.68 (1.1.68.2)</title>
|
||||
<summary>1.1.68.2</summary>
|
||||
<id>urn:uuid:AD8ABBB5-093A-4FDB-B473-FCED2DB46781</id>
|
||||
<title>1.1.69 (1.1.69.1)</title>
|
||||
<summary>1.1.69.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-05-02T00:00:00Z</updated>
|
||||
<updated>2022-05-06T00: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>Server Shutdown window - when shutting down a server, the Cancel Shutdown button is now displayed.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
<author>
|
||||
<name>bletch</name>
|
||||
<email>bletch1971@hotmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:FF2C83B2-6D10-4217-A021-5B5F090FC480</id>
|
||||
<title>1.1.68 (1.1.68.1)</title>
|
||||
<summary>1.1.68.1</summary>
|
||||
<link href="" />
|
||||
<updated>2022-05-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>World Save Backup - added the SaveGames folder to the to the backup zip file.</li>
|
||||
<li>World Save Restore - now restores the SaveGames folder.</li>
|
||||
<li>Fixed an issue that would not send through the auto process messages via RCON using the correct mode selected in the global settings.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue