Require clients to leave current match before creating a new one
This commit is contained in:
parent
c4a1a3f99d
commit
1e7c6a1d02
1 changed files with 6 additions and 0 deletions
|
@ -427,6 +427,11 @@ COMMANDS:
|
|||
|
||||
cmd.client.sendEvent(ev)
|
||||
case bgammon.CommandCreate, "c":
|
||||
if clientGame != nil {
|
||||
cmd.client.sendNotice("Failed to create match: Please leave the match you are in before creating another.")
|
||||
continue
|
||||
}
|
||||
|
||||
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:
|
|||
sendUsage()
|
||||
continue
|
||||
}
|
||||
|
||||
var gamePassword []byte
|
||||
gameType := bytes.ToLower(params[0])
|
||||
var gameName []byte
|
||||
|
|
Loading…
Reference in a new issue