Stub player replacement
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Hamcha 2019-06-28 21:56:47 +02:00
parent 21c257a0b1
commit 98ccf5fe8a
Signed by: hamcha
GPG key ID: A40413D21021EAEE

View file

@ -112,6 +112,22 @@ func (d *DraftBot) handleEvent(roomid string, evt room.Event) {
Owner: evt.Room.Creator,
}
// Someone left
case room.EvtLeft:
// Check if room has a running session
sess, ok := d.Sessions[roomid]
if !ok {
break
}
// Check if player is in that session
player, ok := sess.Players[evt.PlayerName]
if !ok {
break
}
// Replace player with bot
//TODO
_ = player
// A room got closed
case room.EvtRoomClosed:
// Check if there's a session there