Tell people when someone joined a session
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Hamcha 2019-06-27 18:15:51 +02:00
parent f8b5dbfc17
commit be83334e3a

View file

@ -104,6 +104,13 @@ func (d *draftBot) handleMessage(roomid string, msg room.Message) {
// Add player to the list // Add player to the list
session.Players[msg.From] = nil session.Players[msg.From] = nil
d.sendMessage(roomid, room.Message{
Channel: "draft",
Type: "player-joined-session",
Data: msg.From,
Message: fmt.Sprintf("%s joined the draft session (%d players, %d missing)", msg.From, len(session.Players), len(session.Pod.Players)-len(session.Players)),
})
// Player wants something else // Player wants something else
default: default:
// Tell them can either join or GTFO // Tell them can either join or GTFO