.BANCHO. Force stop spectating/quit match if user is not spectating or multiplaying

This commit is contained in:
Nyo
2016-09-04 16:24:00 +02:00
parent 255a0958ff
commit 7fc6d4c540
2 changed files with 10 additions and 4 deletions

View File

@@ -391,6 +391,12 @@ class match:
return -- True if join success, False if fail (room is full)
"""
# Make sure we're not in this match
for i in range(0,16):
if self.slots[i].userID == userID:
# Set bugged slot to free
self.setSlot(i, slotStatuses.free, 0, -1, 0)
# Find first free slot
for i in range(0,16):
if self.slots[i].status == slotStatuses.free: