1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

final changes for 2.0 release

This commit is contained in:
RaidMax
2018-04-21 17:18:20 -05:00
parent a515d9688c
commit c7b4706e78
20 changed files with 230 additions and 87 deletions

View File

@ -20,6 +20,7 @@ namespace SharedLibraryCore
{
public static string OperatingDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + Path.DirectorySeparatorChar;
public static readonly Task CompletedTask = Task.FromResult(false);
public static Encoding EncodingType;
//Get string with specified number of spaces -- really only for visual output
public static String GetSpaces(int Num)
@ -197,15 +198,9 @@ namespace SharedLibraryCore
public static int ConvertToIP(this string str)
{
try
{
return BitConverter.ToInt32(System.Net.IPAddress.Parse(str).GetAddressBytes(), 0);
}
System.Net.IPAddress.TryParse(str, out System.Net.IPAddress ip);
catch (FormatException)
{
return 0;
}
return ip == null ? 0 : BitConverter.ToInt32(ip.GetAddressBytes(), 0);
}
public static string ConvertIPtoString(this int ip)