Skip to content

Commit

Permalink
Update list.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengke15 authored Feb 19, 2024
1 parent caf1317 commit 30b8f9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/access/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ func IsWhitelist(playerName string) (bool, error) {
return playerName == string(bytes), nil
}

var accessedPlayers = make(map[string]bool)

func IsFirstTime(playerName string) bool {
var accessedPlayers = make(map[string]bool)
_, exists := accessedPlayers[playerName]
if !exists {
accessedPlayers[playerName] = true
return true
}
return false
}
}

0 comments on commit 30b8f9e

Please sign in to comment.