add gsc api controller for communicating with gsc

add ignore bots option
fix first localization message not working
This commit is contained in:
RaidMax
2018-10-13 18:49:08 -05:00
parent dded60a6ef
commit a58726d872
7 changed files with 60 additions and 11 deletions

View File

@ -28,6 +28,7 @@ namespace IW4MAdmin.Plugins.Login
if (E.Type == GameEvent.EventType.Connect)
{
AuthorizedClients.TryAdd(E.Origin.ClientId, false);
E.Origin.SetAdditionalProperty("IsLoggedIn", false);
}
if (E.Type == GameEvent.EventType.Disconnect)
@ -51,7 +52,14 @@ namespace IW4MAdmin.Plugins.Login
return Task.CompletedTask;
if (!AuthorizedClients[E.Origin.ClientId])
{
throw new AuthorizationException(Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_LOGIN_AUTH"]);
}
else
{
E.Origin.SetAdditionalProperty("IsLoggedIn", true);
}
}
return Task.CompletedTask;