mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
ListPlayers Change
- added regex handling of the listplayer RCON command. - tr-TR language file added
This commit is contained in:
parent
3e25077cc7
commit
11c411a557
5 changed files with 5830 additions and 13 deletions
|
|
@ -413,6 +413,10 @@
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="Globalization\tr-TR\tr-TR.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Page Include="Windows\AddUserWindow.xaml">
|
<Page Include="Windows\AddUserWindow.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|
|
||||||
5776
src/ARKServerManager/Globalization/tr-TR/tr-TR.xaml
Normal file
5776
src/ARKServerManager/Globalization/tr-TR/tr-TR.xaml
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -13,6 +13,7 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
@ -338,29 +339,31 @@ namespace ServerManagerTool.Lib
|
||||||
0. Bletch, 76561197991984752 <- steam
|
0. Bletch, 76561197991984752 <- steam
|
||||||
0. Bletch, 7171521174456260817 <- epic
|
0. Bletch, 7171521174456260817 <- epic
|
||||||
*/
|
*/
|
||||||
|
var matchRegex = new Regex(@"^(?<index>\d*)\. (?<playerName>.*), (?<playerId>\d*)$");
|
||||||
var output = new List<string>();
|
var output = new List<string>();
|
||||||
var onlinePlayers = new List<PlayerInfo>();
|
var onlinePlayers = new List<PlayerInfo>();
|
||||||
var playerLines = commandLines?.ToList() ?? new List<string>();
|
|
||||||
|
|
||||||
|
var playerLines = commandLines?.ToList() ?? new List<string>();
|
||||||
if (playerLines.Count > 0)
|
if (playerLines.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var line in playerLines)
|
foreach (var line in playerLines)
|
||||||
{
|
{
|
||||||
var elements = line.Split(',', '.');
|
var isMatch = matchRegex.IsMatch(line);
|
||||||
if (elements.Length != 3)
|
if (!isMatch)
|
||||||
// Invalid data. Ignore it.
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var id = elements[2].Trim();
|
var match = matchRegex.Match(line);
|
||||||
|
var playerName = match.Groups["playerName"].Value.Trim();
|
||||||
|
var playerId = match.Groups["playerId"].Value.Trim();
|
||||||
|
|
||||||
if (onlinePlayers.FirstOrDefault(p => p.PlayerId.Equals(id, StringComparison.OrdinalIgnoreCase)) != null)
|
if (onlinePlayers.FirstOrDefault(p => p.PlayerId.Equals(playerId, StringComparison.OrdinalIgnoreCase)) != null)
|
||||||
// Duplicate data. Ignore it.
|
// Duplicate data. Ignore it.
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var newPlayer = new PlayerInfo()
|
var newPlayer = new PlayerInfo()
|
||||||
{
|
{
|
||||||
PlayerId = id,
|
PlayerId = playerId,
|
||||||
PlayerName = elements[1].Trim(),
|
PlayerName = playerName,
|
||||||
IsOnline = true,
|
IsOnline = true,
|
||||||
};
|
};
|
||||||
onlinePlayers.Add(newPlayer);
|
onlinePlayers.Add(newPlayer);
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,14 @@
|
||||||
<title>Ark Server Manager Version Feed</title>
|
<title>Ark Server Manager Version Feed</title>
|
||||||
<subtitle>This is the Ark Server Manager release version feed.</subtitle>
|
<subtitle>This is the Ark Server Manager release version feed.</subtitle>
|
||||||
<link href="http://arkservermanager.freeforums.net/" />
|
<link href="http://arkservermanager.freeforums.net/" />
|
||||||
<updated>2022-07-08T00:00:00Z</updated>
|
<updated>2022-07-11T00:00:00Z</updated>
|
||||||
|
|
||||||
<entry>
|
<entry>
|
||||||
<id>urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877</id>
|
<id>urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877</id>
|
||||||
<title>1.1.435 (1.1.435.3)</title>
|
<title>1.1.435 (1.1.435.4)</title>
|
||||||
<summary>1.1.435.3</summary>
|
<summary>1.1.435.4</summary>
|
||||||
<link href="" />
|
<link href="" />
|
||||||
<updated>2022-07-08T00:00:00Z</updated>
|
<updated>2022-07-11T00:00:00Z</updated>
|
||||||
<content type="xhtml">
|
<content type="xhtml">
|
||||||
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
|
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -21,6 +21,12 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>Server Settings - Rules Section - Enable Tribe Alliance - fixed the checkbox, so that it enables/disables per profile.</li>
|
<li>Server Settings - Rules Section - Enable Tribe Alliance - fixed the checkbox, so that it enables/disables per profile.</li>
|
||||||
<li>Server Settings - Environment Section - Custom Harvest Amount Multiplier - fixed the checkbox, so that it enables/disables when there are changes or unknown resources.</li>
|
<li>Server Settings - Environment Section - Custom Harvest Amount Multiplier - fixed the checkbox, so that it enables/disables when there are changes or unknown resources.</li>
|
||||||
|
<li>RCON - changed the way the online players are handled when they contain a '.' character.</li>
|
||||||
|
</ul>
|
||||||
|
<u style="font-size: .9em;">NEW</u>
|
||||||
|
<br/>
|
||||||
|
<ul>
|
||||||
|
<li>tr-TR Translation file added.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<u style="font-size: .9em;">CHANGE</u>
|
<u style="font-size: .9em;">CHANGE</u>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,35 @@
|
||||||
<title>Ark Server Manager Version Feed</title>
|
<title>Ark Server Manager Version Feed</title>
|
||||||
<subtitle>This is the Ark Server Manager beta version feed.</subtitle>
|
<subtitle>This is the Ark Server Manager beta version feed.</subtitle>
|
||||||
<link href="http://arkservermanager.freeforums.net/" />
|
<link href="http://arkservermanager.freeforums.net/" />
|
||||||
<updated>2022-07-08T00:00:00Z</updated>
|
<updated>2022-07-11T00:00:00Z</updated>
|
||||||
|
|
||||||
|
<entry>
|
||||||
|
<id>urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877</id>
|
||||||
|
<title>1.1.435 (1.1.435.4)</title>
|
||||||
|
<summary>1.1.435.4</summary>
|
||||||
|
<link href="" />
|
||||||
|
<updated>2022-07-11T00: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>RCON - changed the way the online players are handled when they contain a '.' character.</li>
|
||||||
|
</ul>
|
||||||
|
<u style="font-size: .9em;">NEW</u>
|
||||||
|
<br/>
|
||||||
|
<ul>
|
||||||
|
<li>tr-TR Translation file added.</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</content>
|
||||||
|
<author>
|
||||||
|
<name>bletch</name>
|
||||||
|
<email>bletch1971@hotmail.com</email>
|
||||||
|
</author>
|
||||||
|
</entry>
|
||||||
|
|
||||||
<entry>
|
<entry>
|
||||||
<id>urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877</id>
|
<id>urn:uuid:7E95E486-1977-42F0-9AD6-8DB89A81A877</id>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue