Notify the chat when the match has been completed.

This commit is contained in:
Morgan Bazalgette 2017-09-09 12:30:25 +02:00
parent 3ed837dc96
commit e3e46a34ec
No known key found for this signature in database
GPG Key ID: 40D328300D245DA5

View File

@ -427,6 +427,12 @@ class match:
# Console output
log.info("MPROOM{}: Match completed".format(self.matchID))
# If this is a tournament match, then we send a notification in the chat
# saying that the match has completed.
chanName = "#multi_{}".format(self.matchID)
if self.isTourney and (chanName in glob.channels.channels):
chat.sendMessage("FokaBot", chanName, "Match has just finished.")
def resetSlots(self):
for i in range(0,16):
if self.slots[i].user is not None and self.slots[i].status == slotStatuses.PLAYING:
@ -826,7 +832,7 @@ class match:
totalUsers = 0
readyUsers = 0
for slot in match.slots:
for slot in self.slots:
# Make sure there is a user in this slot
if slot.user is None:
continue