Tell people when someone joined a session
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f8b5dbfc17
commit
be83334e3a
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue