diff --git a/src/LegacyMOTHState.go b/src/LegacyMOTHState.go index 282b6e6..6b419b4 100644 --- a/src/LegacyMOTHState.go +++ b/src/LegacyMOTHState.go @@ -33,7 +33,7 @@ func (state *LegacyMOTHState) Initialize() (bool, error) { } func (state *LegacyMOTHState) login(teamName string, token string) (bool, error) { - for a, _ := range state.getTeams() { + for a, _ := range state.getTeamIds() { if a == token { f, err := os.OpenFile(state.StatePath("teams", token), os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0644) if err != nil { @@ -181,7 +181,7 @@ func (state *LegacyMOTHState) Maintenance(maintenanceInterval time.Duration) { } } -func (state *LegacyMOTHState) getTeams() map[string]struct{} { +func (state *LegacyMOTHState) getTeamIds() map[string]struct{} { filepath := state.StatePath("teamids.txt") teamids, err := os.Open(filepath) teams := make(map[string]struct{}) diff --git a/src/maintenance.go b/src/maintenance.go index d04160d..fcd2c54 100644 --- a/src/maintenance.go +++ b/src/maintenance.go @@ -146,7 +146,7 @@ func (ctx *Instance) tidy() { // readTeams reads in the list of team IDs, // so we can quickly validate them. func (ctx *Instance) readTeams() { - teamList := ctx.State.getTeams() + teamList := ctx.State.getTeamIds() // For any new team IDs, set their next attempt time to right now now := time.Now() diff --git a/src/state.go b/src/state.go index dfb607d..5c31c76 100644 --- a/src/state.go +++ b/src/state.go @@ -11,7 +11,7 @@ type MOTHState interface { TeamName(teamId string) (string, error) isEnabled() bool getConfig(configName string) (string, error) - getTeams() map[string]struct{} + getTeamIds() map[string]struct{} login(teamId string, token string) (bool, error) Initialize() (bool, error) }