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

clean up log reader/make it output more useful message if things go wrong

add unflag as a penalty
show bans/tempbans even after they've expired on penalty list
continue making alias links great again
This commit is contained in:
RaidMax
2019-04-05 13:34:03 -05:00
parent 11dc020d7c
commit e3aa62334a
15 changed files with 226 additions and 152 deletions

View File

@ -262,6 +262,18 @@ namespace IW4MAdmin
else if (E.Type == GameEvent.EventType.Unflag)
{
var unflagPenalty = new Penalty()
{
Type = Penalty.PenaltyType.Unflag,
Expires = DateTime.UtcNow,
Offender = E.Target,
Offense = E.Data,
Punisher = E.Origin,
When = DateTime.UtcNow,
Link = E.Target.AliasLink
};
await Manager.GetPenaltyService().Create(unflagPenalty);
E.Target.SetLevel(Permission.User, E.Origin);
}
@ -593,6 +605,12 @@ namespace IW4MAdmin
// this are our new connecting clients
foreach (var client in polledClients[0])
{
// note: this prevents players in ZMBI state from being registered with no name
if (string.IsNullOrEmpty(client.Name))
{
continue;
}
var e = new GameEvent()
{
Type = GameEvent.EventType.PreConnect,