mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-03 02:28:39 +00:00
Remove empty rooms and rooms with too many players when cleaning up rooms
This commit is contained in:
parent
5ff92584f5
commit
b9ee24df69
1 changed files with 3 additions and 0 deletions
|
@ -182,6 +182,9 @@ namespace LBPUnion.ProjectLighthouse.Helpers
|
|||
|
||||
foreach (User newRoomPlayer in newRoom.Players) room.Players.RemoveAll(p => p == newRoomPlayer);
|
||||
}
|
||||
|
||||
Rooms.RemoveAll(r => r.Players.Count == 0); // Remove empty rooms
|
||||
Rooms.RemoveAll(r => r.Players.Count > 4); // Remove obviously bogus rooms
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue