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

properly implement sv_sayName for custom say name

prevent trying to register live radar page for every server (oops)
optimize event processing to prevent slow plugins from affecting command processing
enable database connection resilency
trim extra characters from T7 reassembled response
This commit is contained in:
RaidMax
2020-04-20 10:45:58 -05:00
parent 37daca4a9f
commit 1d3af2079a
7 changed files with 55 additions and 33 deletions

View File

@ -17,6 +17,7 @@ namespace LiveRadar
public string Author => "RaidMax";
private readonly IConfigurationHandler<LiveRadarConfiguration> _configurationHandler;
private bool addedPage;
public Plugin(IConfigurationHandlerFactory configurationHandlerFactory)
{
@ -27,11 +28,13 @@ namespace LiveRadar
{
// if it's an IW4 game, with custom callbacks, we want to
// enable the live radar page
if (E.Type == GameEvent.EventType.Start &&
if (E.Type == GameEvent.EventType.Start &&
S.GameName == Server.Game.IW4 &&
S.CustomCallback)
S.CustomCallback &&
!addedPage)
{
E.Owner.Manager.GetPageList().Pages.Add(Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_RADAR_TITLE"], "/Radar/All");
addedPage = true;
}
if (E.Type == GameEvent.EventType.Unknown)