Small server changes. Removed unused client function
This commit is contained in:
@ -52,27 +52,6 @@ namespace CoopClient
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static double Average(this IEnumerable<ulong> source)
|
||||
{
|
||||
ulong num = 0L;
|
||||
ulong num2 = 0L;
|
||||
checked
|
||||
{
|
||||
foreach (ulong item in source)
|
||||
{
|
||||
num += item;
|
||||
num2++;
|
||||
}
|
||||
|
||||
if (num2 > 0)
|
||||
{
|
||||
return num / num2;
|
||||
}
|
||||
|
||||
throw new Exception("No elements");
|
||||
}
|
||||
}
|
||||
|
||||
public static (byte, byte[]) GetBytesFromObject(object obj)
|
||||
{
|
||||
switch (obj)
|
||||
|
@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyVersion>1.52.2.0001</AssemblyVersion>
|
||||
<AssemblyVersion>1.52.3.0001</AssemblyVersion>
|
||||
<FileVersion>1.0.0.0</FileVersion>
|
||||
<RepositoryUrl>https://github.com/GTACOOP-R/GTACoop-R</RepositoryUrl>
|
||||
</PropertyGroup>
|
||||
|
@ -45,7 +45,7 @@ namespace CoopServer
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logging.Error(e.ToString());
|
||||
Logging.Error(e.InnerException?.Message ?? e.Message);
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,8 @@ namespace CoopServer
|
||||
{
|
||||
internal class IpInfo
|
||||
{
|
||||
public string country { get; set; }
|
||||
[JsonProperty("country")]
|
||||
public string Country { get; set; }
|
||||
}
|
||||
|
||||
internal class Server
|
||||
@ -119,7 +120,7 @@ namespace CoopServer
|
||||
}
|
||||
catch
|
||||
{
|
||||
info = new() { country = "?" };
|
||||
info = new() { Country = "?" };
|
||||
}
|
||||
|
||||
while (!Program.ReadyToStop)
|
||||
@ -135,7 +136,7 @@ namespace CoopServer
|
||||
"\"allowlist\": \"" + _mainAllowlist.Username.Any() + "\", " +
|
||||
"\"mods\": \"" + MainSettings.ModsAllowed + "\", " +
|
||||
"\"npcs\": \"" + MainSettings.NpcsAllowed + "\", " +
|
||||
"\"country\": \"" + info.country + "\"" +
|
||||
"\"country\": \"" + info.Country + "\"" +
|
||||
" }";
|
||||
|
||||
HttpResponseMessage response = null;
|
||||
|
Reference in New Issue
Block a user