mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-11 15:52:25 -05:00
allow reports to be filed against anyone
fix rare issue with alias (maybe) update some tests
This commit is contained in:
24
Plugins/Tests/TestHelpers.cs
Normal file
24
Plugins/Tests/TestHelpers.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using IW4MAdmin.Application;
|
||||
using SharedLibraryCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
internal static class TestHelpers
|
||||
{
|
||||
internal static void EmulateClientJoinLog(this Server svr)
|
||||
{
|
||||
long guid = svr.ClientNum + 1;
|
||||
File.AppendAllText(svr.LogPath, $"0:00 J;{guid};{svr.ClientNum};test_client_{svr.ClientNum}\r\n");
|
||||
}
|
||||
|
||||
internal static void EmulateClientQuitLog(this Server svr)
|
||||
{
|
||||
long guid = Math.Max(1, svr.ClientNum);
|
||||
File.AppendAllText(svr.LogPath, $"0:00 Q;{guid};{svr.ClientNum};test_client_{svr.ClientNum}\r\n");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user