mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
make sure flags are excluded from active penalties on player profile
modify how flags "expire"
This commit is contained in:
@ -266,11 +266,18 @@ namespace IW4MAdmin
|
||||
|
||||
else if (E.Type == GameEvent.EventType.Flag)
|
||||
{
|
||||
DateTime? expires = null;
|
||||
|
||||
if (E.Extra is TimeSpan ts)
|
||||
{
|
||||
expires = DateTime.UtcNow + ts;
|
||||
}
|
||||
|
||||
// todo: maybe move this to a seperate function
|
||||
var newPenalty = new EFPenalty()
|
||||
{
|
||||
Type = EFPenalty.PenaltyType.Flag,
|
||||
Expires = DateTime.UtcNow,
|
||||
Expires = expires,
|
||||
Offender = E.Target,
|
||||
Offense = E.Data,
|
||||
Punisher = E.Origin,
|
||||
|
Reference in New Issue
Block a user