1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

update shared guid kick plugin

script plugins reload without error using the correct file share mode when opening
increase socket timeout to 10 seconds
This commit is contained in:
RaidMax
2018-10-09 20:19:06 -05:00
parent 7dbe473923
commit 72a3ae65d5
4 changed files with 14 additions and 5 deletions

View File

@ -39,7 +39,7 @@ namespace SharedLibraryCore.RCon
/// <summary>
/// timeout in seconds to wait for a socket send or receive before giving up
/// </summary>
public static readonly int SocketTimeout = 7500;
public static readonly int SocketTimeout = 10000;
/// <summary>
/// interval in milliseconds to wait before sending the next RCon request
/// </summary>

View File

@ -57,7 +57,16 @@ namespace SharedLibraryCore
}
Manager = mgr;
string script = File.ReadAllText(FileName);
string script;
using (var stream = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
using (var reader = new StreamReader(stream, Encoding.Default))
{
script = await reader.ReadToEndAsync();
}
}
ScriptEngine = new Jint.Engine(cfg =>
cfg.AllowClr(new[]
{