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:
@ -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,
|
||||
|
Reference in New Issue
Block a user