Fix formatting, typo, and bug from pull request.

This commit is contained in:
Patrick Fairbank
2018-11-11 11:31:56 -08:00
parent c47c8b50de
commit 38e4d28eac
2 changed files with 6 additions and 6 deletions

View File

@@ -952,4 +952,4 @@ func (arena *Arena) handleEstop(station string, state bool) {
allianceStation.Estop = false
}
}
}
}

View File

@@ -33,13 +33,13 @@ func (web *Web) settingsPostHandler(w http.ResponseWriter, r *http.Request) {
}
eventSettings := web.arena.EventSettings
perviousEventName = eventSettings.Name
previousEventName := eventSettings.Name
eventSettings.Name = r.PostFormValue("name")
if len(eventSettings.Name) < 1 && eventSettings.Name != perviousEventName{
eventSettings.Name = perviousEventName
if len(eventSettings.Name) < 1 && eventSettings.Name != previousEventName {
eventSettings.Name = previousEventName
}
numAlliances, _ := strconv.Atoi(r.PostFormValue("numElimAlliances"))
if numAlliances < 2 || numAlliances > 16 {
web.renderSettings(w, r, "Number of alliances must be between 2 and 16.")