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

migrate welcome plugin to .NET Core 2.0

more fixes to stats database for migration
last connection set when client connects and disconnects
update GeoIP datatbase
This commit is contained in:
RaidMax
2018-04-09 14:17:10 -05:00
parent 56ae7d69c2
commit 1bcf3a0b94
36 changed files with 395 additions and 481 deletions

View File

@ -362,7 +362,7 @@ namespace SharedLibraryCore
Name = client.CurrentAlias.Name,
IPAddress = client.CurrentAlias.IPAddress,
Level = client.Level,
LastConnection = DateTime.UtcNow,
LastConnection = client.LastConnection == DateTime.MinValue ? DateTime.UtcNow : client.LastConnection,
CurrentAlias = client.CurrentAlias,
CurrentAliasId = client.CurrentAlias.AliasId
};
@ -391,7 +391,9 @@ namespace SharedLibraryCore
public static async Task<DVAR<T>> GetDvarAsync<T>(this Server server, string dvarName)
{
string[] LineSplit = await server.RemoteConnection.SendQueryAsync(QueryType.DVAR, dvarName);
string[] LineSplit = server.GameName != Game.T6M ?
await server.RemoteConnection.SendQueryAsync(QueryType.DVAR, dvarName) :
await server.RemoteConnection.SendQueryAsync(QueryType.COMMAND, $"get {dvarName}");
if (LineSplit.Length != 3)
{