Small server changes. Removed unused client function

This commit is contained in:
EntenKoeniq
2022-04-19 00:16:14 +02:00
parent 7d411474cd
commit 6f79842121
4 changed files with 6 additions and 26 deletions

View File

@ -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)

View File

@ -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>

View File

@ -45,7 +45,7 @@ namespace CoopServer
}
catch (Exception e)
{
Logging.Error(e.ToString());
Logging.Error(e.InnerException?.Message ?? e.Message);
Console.ReadLine();
}
}

View File

@ -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;