2017-05-26 18:49:27 -04:00
|
|
|
|
using System;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Text.RegularExpressions;
|
2017-05-31 01:31:56 -04:00
|
|
|
|
using System.Linq;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
using System.Collections.Generic;
|
2017-11-25 20:29:58 -05:00
|
|
|
|
|
2018-04-08 02:44:42 -04:00
|
|
|
|
using SharedLibraryCore.Objects;
|
|
|
|
|
using static SharedLibraryCore.Server;
|
2018-02-21 20:29:23 -05:00
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.IO;
|
2018-04-02 01:25:06 -04:00
|
|
|
|
using System.Threading.Tasks;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
|
2018-04-08 02:44:42 -04:00
|
|
|
|
namespace SharedLibraryCore
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
2017-05-26 18:49:27 -04:00
|
|
|
|
public static class Utilities
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
2018-02-21 20:29:23 -05:00
|
|
|
|
public static string OperatingDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + Path.DirectorySeparatorChar;
|
2018-04-05 00:38:45 -04:00
|
|
|
|
public static readonly Task CompletedTask = Task.FromResult(false);
|
2018-04-21 18:18:20 -04:00
|
|
|
|
public static Encoding EncodingType;
|
2018-04-22 16:04:18 -04:00
|
|
|
|
public static Localization.Layout CurrentLocalization;
|
2018-02-21 20:29:23 -05:00
|
|
|
|
|
2015-08-20 01:06:44 -04:00
|
|
|
|
//Get string with specified number of spaces -- really only for visual output
|
2017-06-12 17:47:31 -04:00
|
|
|
|
public static String GetSpaces(int Num)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
|
|
|
|
String SpaceString = String.Empty;
|
|
|
|
|
while (Num > 0)
|
|
|
|
|
{
|
|
|
|
|
SpaceString += ' ';
|
|
|
|
|
Num--;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return SpaceString;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Remove words from a space delimited string
|
2017-05-26 18:49:27 -04:00
|
|
|
|
public static String RemoveWords(this string str, int num)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
2017-05-26 18:49:27 -04:00
|
|
|
|
if (str == null || str.Length == 0)
|
|
|
|
|
return "";
|
|
|
|
|
|
2015-08-20 01:06:44 -04:00
|
|
|
|
String newStr = String.Empty;
|
|
|
|
|
String[] tmp = str.Split(' ');
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < tmp.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
if (i >= num)
|
|
|
|
|
newStr += tmp[i] + ' ';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return newStr;
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-12 17:47:31 -04:00
|
|
|
|
public static Player.Permission MatchPermission(String str)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
|
|
|
|
String lookingFor = str.ToLower();
|
2017-06-12 17:47:31 -04:00
|
|
|
|
|
2017-06-19 13:58:01 -04:00
|
|
|
|
for (Player.Permission Perm = Player.Permission.User; Perm < Player.Permission.Console; Perm++)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
if (lookingFor.Contains(Perm.ToString().ToLower()))
|
|
|
|
|
return Perm;
|
|
|
|
|
|
|
|
|
|
return Player.Permission.Banned;
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-23 17:58:48 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Remove all IW Engine color codes
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str">String containing color codes</param>
|
|
|
|
|
/// <returns></returns>
|
2017-05-26 18:49:27 -04:00
|
|
|
|
public static String StripColors(this string str)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
|
|
|
|
if (str == null)
|
|
|
|
|
return "";
|
2018-03-06 02:22:19 -05:00
|
|
|
|
str = Regex.Replace(str, @"(\^+((?![a-z]|[A-Z]).){0,1})+", "");
|
|
|
|
|
string str2 = Regex.Match(str, @"(^\/+.*$)|(^.*\/+$)")
|
|
|
|
|
.Value
|
2018-02-23 02:06:13 -05:00
|
|
|
|
.Replace("/", " /");
|
2018-03-06 02:22:19 -05:00
|
|
|
|
return str2.Length > 0 ? str2 : str;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|
|
|
|
|
|
2015-08-23 17:58:48 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the IW Engine color code corresponding to an admin level
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="level">Specified player level</param>
|
|
|
|
|
/// <returns></returns>
|
2017-06-12 17:47:31 -04:00
|
|
|
|
public static String ConvertLevelToColor(Player.Permission level)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
|
|
|
|
switch (level)
|
|
|
|
|
{
|
|
|
|
|
case Player.Permission.Banned:
|
|
|
|
|
return "^1" + Player.Permission.Banned;
|
|
|
|
|
case Player.Permission.Flagged:
|
2016-01-16 17:58:24 -05:00
|
|
|
|
return "^9" + Player.Permission.Flagged;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
case Player.Permission.Owner:
|
|
|
|
|
return "^5" + Player.Permission.Owner;
|
|
|
|
|
case Player.Permission.User:
|
|
|
|
|
return "^2" + Player.Permission.User;
|
2016-01-16 17:58:24 -05:00
|
|
|
|
case Player.Permission.Trusted:
|
|
|
|
|
return "^3" + Player.Permission.Trusted;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
default:
|
2016-01-16 17:58:24 -05:00
|
|
|
|
return "^6" + level;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-12 17:47:31 -04:00
|
|
|
|
public static String ProcessMessageToken(IList<Helpers.MessageToken> tokens, String str)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
2017-05-31 01:31:56 -04:00
|
|
|
|
MatchCollection RegexMatches = Regex.Matches(str, @"\{\{[A-Z]+\}\}", RegexOptions.IgnoreCase);
|
|
|
|
|
foreach (Match M in RegexMatches)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
|
|
|
|
String Match = M.Value;
|
|
|
|
|
String Identifier = M.Value.Substring(2, M.Length - 4);
|
2015-08-22 02:04:30 -04:00
|
|
|
|
|
2017-05-31 01:31:56 -04:00
|
|
|
|
var found = tokens.FirstOrDefault(t => t.Name.ToLower() == Identifier.ToLower());
|
2015-08-22 02:04:30 -04:00
|
|
|
|
|
2017-05-31 01:31:56 -04:00
|
|
|
|
if (found != null)
|
|
|
|
|
str = str.Replace(Match, found.ToString());
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-31 01:31:56 -04:00
|
|
|
|
public static bool IsBroadcastCommand(this string str)
|
|
|
|
|
{
|
|
|
|
|
return str[0] == '@';
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-23 17:58:48 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the full gametype name
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input">Shorthand gametype reported from server</param>
|
|
|
|
|
/// <returns></returns>
|
2017-06-12 17:47:31 -04:00
|
|
|
|
public static String GetLocalizedGametype(String input)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
|
|
|
|
switch (input)
|
|
|
|
|
{
|
|
|
|
|
case "dm":
|
|
|
|
|
return "Deathmatch";
|
|
|
|
|
case "war":
|
|
|
|
|
return "Team Deathmatch";
|
|
|
|
|
case "koth":
|
|
|
|
|
return "Headquarters";
|
|
|
|
|
case "ctf":
|
|
|
|
|
return "Capture The Flag";
|
|
|
|
|
case "dd":
|
|
|
|
|
return "Demolition";
|
|
|
|
|
case "dom":
|
|
|
|
|
return "Domination";
|
|
|
|
|
case "sab":
|
|
|
|
|
return "Sabotage";
|
|
|
|
|
case "sd":
|
|
|
|
|
return "Search & Destroy";
|
|
|
|
|
case "vip":
|
|
|
|
|
return "Very Important Person";
|
|
|
|
|
case "gtnw":
|
|
|
|
|
return "Global Thermonuclear War";
|
|
|
|
|
case "oitc":
|
|
|
|
|
return "One In The Chamber";
|
|
|
|
|
case "arena":
|
|
|
|
|
return "Arena";
|
|
|
|
|
case "dzone":
|
|
|
|
|
return "Drop Zone";
|
|
|
|
|
case "gg":
|
|
|
|
|
return "Gun Game";
|
|
|
|
|
case "snipe":
|
|
|
|
|
return "Sniping";
|
|
|
|
|
case "ss":
|
|
|
|
|
return "Sharp Shooter";
|
|
|
|
|
case "m40a3":
|
|
|
|
|
return "M40A3";
|
|
|
|
|
case "fo":
|
|
|
|
|
return "Face Off";
|
|
|
|
|
case "dmc":
|
|
|
|
|
return "Deathmatch Classic";
|
|
|
|
|
case "killcon":
|
|
|
|
|
return "Kill Confirmed";
|
|
|
|
|
case "oneflag":
|
|
|
|
|
return "One Flag CTF";
|
|
|
|
|
default:
|
2017-05-26 18:49:27 -04:00
|
|
|
|
return input;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-02-10 23:33:42 -05:00
|
|
|
|
public static long ConvertLong(this string str)
|
|
|
|
|
{
|
2018-02-16 23:24:03 -05:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
return Int64.Parse(str, System.Globalization.NumberStyles.HexNumber);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
catch (FormatException)
|
|
|
|
|
{
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
2018-02-10 23:33:42 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static int ConvertToIP(this string str)
|
|
|
|
|
{
|
2018-04-21 18:18:20 -04:00
|
|
|
|
System.Net.IPAddress.TryParse(str, out System.Net.IPAddress ip);
|
2018-02-16 23:24:03 -05:00
|
|
|
|
|
2018-04-21 18:18:20 -04:00
|
|
|
|
return ip == null ? 0 : BitConverter.ToInt32(ip.GetAddressBytes(), 0);
|
2018-02-10 23:33:42 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string ConvertIPtoString(this int ip)
|
|
|
|
|
{
|
|
|
|
|
return new System.Net.IPAddress(BitConverter.GetBytes(ip)).ToString();
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-12 17:47:31 -04:00
|
|
|
|
public static String GetTimePassed(DateTime start)
|
2017-10-03 19:17:35 -04:00
|
|
|
|
{
|
|
|
|
|
return GetTimePassed(start, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String GetTimePassed(DateTime start, bool includeAgo)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
2017-11-29 19:35:50 -05:00
|
|
|
|
TimeSpan Elapsed = DateTime.UtcNow - start;
|
2017-10-03 19:17:35 -04:00
|
|
|
|
string ago = includeAgo ? " ago" : "";
|
2015-08-20 01:06:44 -04:00
|
|
|
|
|
2017-10-03 19:17:35 -04:00
|
|
|
|
if (Elapsed.TotalSeconds < 30 && includeAgo)
|
2017-05-26 18:49:27 -04:00
|
|
|
|
return "just now";
|
2015-08-20 01:06:44 -04:00
|
|
|
|
if (Elapsed.TotalMinutes < 120)
|
2017-05-26 18:49:27 -04:00
|
|
|
|
{
|
|
|
|
|
if (Elapsed.TotalMinutes < 1.5)
|
2017-10-03 19:17:35 -04:00
|
|
|
|
return $"1 minute{ago}";
|
|
|
|
|
return Math.Round(Elapsed.TotalMinutes, 0) + $" minutes{ago}";
|
2017-05-26 18:49:27 -04:00
|
|
|
|
}
|
2015-08-20 01:06:44 -04:00
|
|
|
|
if (Elapsed.TotalHours <= 24)
|
2017-05-26 18:49:27 -04:00
|
|
|
|
{
|
|
|
|
|
if (Elapsed.TotalHours < 1.5)
|
2017-10-03 19:17:35 -04:00
|
|
|
|
return $"1 hour{ago}";
|
|
|
|
|
return Math.Round(Elapsed.TotalHours, 0) + $" hours{ago}";
|
2017-05-26 18:49:27 -04:00
|
|
|
|
}
|
2015-08-20 01:06:44 -04:00
|
|
|
|
if (Elapsed.TotalDays <= 365)
|
2017-05-26 18:49:27 -04:00
|
|
|
|
{
|
2017-11-25 20:29:58 -05:00
|
|
|
|
if (Elapsed.TotalDays < 1.5)
|
2017-10-03 19:17:35 -04:00
|
|
|
|
return $"1 day{ago}";
|
|
|
|
|
return Math.Round(Elapsed.TotalDays, 0) + $" days{ago}";
|
2017-05-26 18:49:27 -04:00
|
|
|
|
}
|
2015-08-20 01:06:44 -04:00
|
|
|
|
else
|
2017-10-03 19:17:35 -04:00
|
|
|
|
return $"a very long time{ago}";
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|
2017-08-08 22:44:52 -04:00
|
|
|
|
|
|
|
|
|
public static Game GetGame(string gameName)
|
|
|
|
|
{
|
|
|
|
|
if (gameName.Contains("IW4"))
|
|
|
|
|
return Game.IW4;
|
|
|
|
|
if (gameName.Contains("CoD4"))
|
|
|
|
|
return Game.IW3;
|
|
|
|
|
if (gameName.Contains("WaW"))
|
|
|
|
|
return Game.T4;
|
|
|
|
|
if (gameName.Contains("COD_T5_S"))
|
|
|
|
|
return Game.T5;
|
2018-03-24 17:35:54 -04:00
|
|
|
|
if (gameName.Contains("T5M"))
|
|
|
|
|
return Game.T5M;
|
2017-08-08 22:44:52 -04:00
|
|
|
|
if (gameName.Contains("IW5"))
|
|
|
|
|
return Game.IW5;
|
2018-04-08 17:50:58 -04:00
|
|
|
|
if (gameName.Contains("COD_T6_S"))
|
|
|
|
|
return Game.T6M;
|
2017-08-08 22:44:52 -04:00
|
|
|
|
|
|
|
|
|
return Game.UKN;
|
|
|
|
|
}
|
2017-08-23 18:29:48 -04:00
|
|
|
|
|
2018-04-19 18:52:48 -04:00
|
|
|
|
public static string EscapeMarkdown(this string markdownString)
|
|
|
|
|
{
|
|
|
|
|
return markdownString.Replace("<", "\\<").Replace(">", "\\>").Replace("|", "\\|");
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-23 18:29:48 -04:00
|
|
|
|
public static TimeSpan ParseTimespan(this string input)
|
|
|
|
|
{
|
|
|
|
|
var expressionMatch = Regex.Match(input, @"[0-9]+.\b");
|
|
|
|
|
|
|
|
|
|
if (!expressionMatch.Success) // fallback to default tempban length of 1 hour
|
|
|
|
|
return new TimeSpan(1, 0, 0);
|
|
|
|
|
|
|
|
|
|
char lengthDenote = expressionMatch.Value[expressionMatch.Value.Length - 1];
|
|
|
|
|
int length = Int32.Parse(expressionMatch.Value.Substring(0, expressionMatch.Value.Length - 1));
|
|
|
|
|
|
|
|
|
|
switch (lengthDenote)
|
|
|
|
|
{
|
|
|
|
|
case 'm':
|
|
|
|
|
return new TimeSpan(0, length, 0);
|
|
|
|
|
case 'h':
|
|
|
|
|
return new TimeSpan(length, 0, 0);
|
|
|
|
|
case 'd':
|
|
|
|
|
return new TimeSpan(length, 0, 0, 0);
|
|
|
|
|
case 'w':
|
|
|
|
|
return new TimeSpan(length * 7, 0, 0, 0);
|
|
|
|
|
case 'y':
|
|
|
|
|
return new TimeSpan(length * 365, 0, 0, 0);
|
|
|
|
|
default:
|
|
|
|
|
return new TimeSpan(1, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string TimeSpanText(this TimeSpan span)
|
|
|
|
|
{
|
2017-09-27 16:07:43 -04:00
|
|
|
|
if (span.TotalMinutes < 60)
|
|
|
|
|
return $"{span.Minutes} minute(s)";
|
|
|
|
|
else if (span.Hours >= 1 && span.TotalHours < 24)
|
|
|
|
|
return $"{span.Hours} hour(s)";
|
|
|
|
|
else if (span.TotalDays >= 1 && span.TotalDays < 7)
|
|
|
|
|
return $"{span.Days} day(s)";
|
|
|
|
|
else if (span.TotalDays >= 7 && span.TotalDays < 365)
|
|
|
|
|
return $"{Math.Ceiling(span.Days / 7.0)} week(s)";
|
|
|
|
|
else if (span.TotalDays >= 365 && span.TotalDays < 36500)
|
|
|
|
|
return $"{Math.Ceiling(span.Days / 365.0)} year(s)";
|
|
|
|
|
else if (span.TotalDays >= 36500)
|
|
|
|
|
return "Forever";
|
2017-08-23 18:29:48 -04:00
|
|
|
|
|
|
|
|
|
return "1 hour";
|
|
|
|
|
}
|
2017-11-16 18:09:19 -05:00
|
|
|
|
|
2017-11-25 20:29:58 -05:00
|
|
|
|
public static Player AsPlayer(this Database.Models.EFClient client)
|
|
|
|
|
{
|
|
|
|
|
return client == null ? null : new Player()
|
|
|
|
|
{
|
|
|
|
|
Active = client.Active,
|
2017-11-29 19:35:50 -05:00
|
|
|
|
AliasLink = client.AliasLink,
|
2017-11-25 20:29:58 -05:00
|
|
|
|
AliasLinkId = client.AliasLinkId,
|
|
|
|
|
ClientId = client.ClientId,
|
2018-02-23 02:06:13 -05:00
|
|
|
|
ClientNumber = -1,
|
2017-11-25 20:29:58 -05:00
|
|
|
|
FirstConnection = client.FirstConnection,
|
|
|
|
|
Connections = client.Connections,
|
|
|
|
|
NetworkId = client.NetworkId,
|
|
|
|
|
TotalConnectionTime = client.TotalConnectionTime,
|
|
|
|
|
Masked = client.Masked,
|
2017-11-29 19:35:50 -05:00
|
|
|
|
Name = client.CurrentAlias.Name,
|
|
|
|
|
IPAddress = client.CurrentAlias.IPAddress,
|
|
|
|
|
Level = client.Level,
|
2018-04-09 15:17:10 -04:00
|
|
|
|
LastConnection = client.LastConnection == DateTime.MinValue ? DateTime.UtcNow : client.LastConnection,
|
2018-02-07 00:19:06 -05:00
|
|
|
|
CurrentAlias = client.CurrentAlias,
|
2018-04-15 21:27:43 -04:00
|
|
|
|
CurrentAliasId = client.CurrentAlias.AliasId,
|
|
|
|
|
IsBot = client.NetworkId == -1
|
2017-11-25 20:29:58 -05:00
|
|
|
|
};
|
|
|
|
|
}
|
2018-03-06 02:22:19 -05:00
|
|
|
|
|
2018-03-24 17:35:54 -04:00
|
|
|
|
public static bool IsPrivileged(this Player p) => p.Level > Player.Permission.User;
|
2018-03-29 00:40:57 -04:00
|
|
|
|
|
|
|
|
|
public static bool PromptBool(string question)
|
|
|
|
|
{
|
|
|
|
|
Console.Write($"{question}? [y/n]: ");
|
|
|
|
|
return (Console.ReadLine().ToLower().FirstOrDefault() as char?) == 'y';
|
|
|
|
|
}
|
2018-03-30 00:13:40 -04:00
|
|
|
|
|
|
|
|
|
public static string PromptString(string question)
|
|
|
|
|
{
|
|
|
|
|
string response;
|
|
|
|
|
do
|
|
|
|
|
{
|
2018-04-11 18:24:21 -04:00
|
|
|
|
Console.Write($"{question}: ");
|
2018-03-30 00:13:40 -04:00
|
|
|
|
response = Console.ReadLine();
|
|
|
|
|
} while (string.IsNullOrWhiteSpace(response));
|
|
|
|
|
|
|
|
|
|
return response;
|
|
|
|
|
}
|
2018-04-02 01:25:06 -04:00
|
|
|
|
|
2018-04-13 02:32:30 -04:00
|
|
|
|
public static int ClientIdFromString(String[] lineSplit, int cIDPos)
|
|
|
|
|
{
|
|
|
|
|
int pID = -2; // apparently falling = -1 cID so i can't use it now
|
|
|
|
|
int.TryParse(lineSplit[cIDPos].Trim(), out pID);
|
|
|
|
|
|
|
|
|
|
if (pID == -1) // special case similar to mod_suicide
|
|
|
|
|
int.TryParse(lineSplit[2], out pID);
|
|
|
|
|
|
|
|
|
|
return pID;
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-15 21:27:43 -04:00
|
|
|
|
public static Task<Dvar<T>> GetDvarAsync<T>(this Server server, string dvarName) => server.RconParser.GetDvarAsync<T>(server.RemoteConnection, dvarName);
|
2018-04-02 01:25:06 -04:00
|
|
|
|
|
2018-04-15 21:27:43 -04:00
|
|
|
|
public static Task SetDvarAsync(this Server server, string dvarName, object dvarValue) => server.RconParser.SetDvarAsync(server.RemoteConnection, dvarName, dvarValue);
|
2018-04-02 01:25:06 -04:00
|
|
|
|
|
2018-04-15 21:27:43 -04:00
|
|
|
|
public static Task<string[]> ExecuteCommandAsync(this Server server, string commandName) => server.RconParser.ExecuteCommandAsync(server.RemoteConnection, commandName);
|
2018-04-02 01:25:06 -04:00
|
|
|
|
|
2018-04-15 21:27:43 -04:00
|
|
|
|
public static Task<List<Player>> GetStatusAsync(this Server server) => server.RconParser.GetStatusAsync(server.RemoteConnection);
|
2018-04-06 20:15:17 -04:00
|
|
|
|
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|
|
|
|
|
}
|