Require clients to leave current match before creating a new one

This commit is contained in:
Trevor Slocum 2023-09-19 00:55:47 -07:00
parent c4a1a3f99d
commit 1e7c6a1d02

View file

@ -427,6 +427,11 @@ COMMANDS:
case bgammon.CommandCreate, "c":
if clientGame != nil {
cmd.client.sendNotice("Failed to create match: Please leave the match you are in before creating another.")
sendUsage := func() {
cmd.client.sendNotice("To create a public match please specify whether it is public or private. When creating a private match, a password must also be provided.")
@ -434,6 +439,7 @@ COMMANDS:
var gamePassword []byte
gameType := bytes.ToLower(params[0])
var gameName []byte