New option to disallow team creation: join only
This commit is contained in:
parent
5d3ef96f3f
commit
64b9e9a251
6 changed files with 53 additions and 30 deletions
|
@ -18,6 +18,7 @@ import (
|
|||
var (
|
||||
allowRegistration = false
|
||||
canJoinTeam = false
|
||||
denyTeamCreation = false
|
||||
)
|
||||
|
||||
type uTeamRegistration struct {
|
||||
|
@ -78,6 +79,8 @@ func treatRegistration(pathname string, team_id string) {
|
|||
log.Printf("%s [WRN] %s\n", id, err)
|
||||
}
|
||||
}
|
||||
} else if denyTeamCreation {
|
||||
log.Printf("%s [ERR] Registration received, whereas team creation denied. Skipped.\n", id)
|
||||
} else if validTeamName(nTeam.TeamName) {
|
||||
if team, err := fic.CreateTeam(nTeam.TeamName, uint32(rand.Int31n(16581376))); err != nil {
|
||||
log.Printf("%s [ERR] Unable to register new team %s: %s\n", id, nTeam.TeamName, err)
|
||||
|
|
Reference in a new issue