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

include some of the changes meant for previous build

This commit is contained in:
RaidMax
2020-04-22 20:51:04 -05:00
parent 0e6a7f89b2
commit b7f1697c79
3 changed files with 17 additions and 12 deletions

View File

@ -18,6 +18,7 @@ namespace LiveRadar
private readonly IConfigurationHandler<LiveRadarConfiguration> _configurationHandler;
private bool addedPage;
private object lockObject;
public Plugin(IConfigurationHandlerFactory configurationHandlerFactory)
{
@ -28,13 +29,16 @@ 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 &&
S.GameName == Server.Game.IW4 &&
S.CustomCallback &&
!addedPage)
lock (lockObject)
{
E.Owner.Manager.GetPageList().Pages.Add(Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_RADAR_TITLE"], "/Radar/All");
addedPage = true;
if (E.Type == GameEvent.EventType.Start &&
S.GameName == Server.Game.IW4 &&
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)