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

partial support of IW6x until the game log is implemented

This commit is contained in:
RaidMax
2020-11-07 10:40:58 -06:00
parent a001f55097
commit f8c886d9db
7 changed files with 149 additions and 32 deletions

View File

@ -49,14 +49,23 @@ namespace SharedLibraryCore.RCon
/// <summary>
/// timeout in seconds to wait for a socket send or receive before giving up
/// </summary>
public static readonly int SocketTimeout = 10000;
public static TimeSpan SocketTimeout(int retryAttempt)
{
return retryAttempt switch
{
1 => TimeSpan.FromMilliseconds(550),
2 => TimeSpan.FromMilliseconds(1000),
3 => TimeSpan.FromMilliseconds(2000),
_ => TimeSpan.FromMilliseconds(5000),
};
}
/// <summary>
/// interval in milliseconds to wait before sending the next RCon request
/// </summary>
public static readonly int FloodProtectionInterval = 650;
public static readonly int FloodProtectionInterval = 750;
/// <summary>
/// how many failed connection attempts before aborting connection
/// </summary>
public static readonly int AllowedConnectionFails = 3;
public static readonly int AllowedConnectionFails = 4;
}
}

View File

@ -269,7 +269,7 @@ namespace SharedLibraryCore
{
try
{
return (await this.GetDvarAsync<string>("sv_customcallbacks")).Value == "1";
return (await this.GetDvarAsync("sv_customcallbacks", "0")).Value == "1";
}
catch (Exceptions.DvarException)