Skip to content

Commit 16e3d3d

Browse files
committed
Server fix: GeneratePlatformUserId not working. Fixes #103
1 parent a537a14 commit 16e3d3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/internal/models/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func generatePlatformUserIdXbox(rng *rand.Rand) uint64 {
9292
func (users *MainUsers) GetOrCreateUser(gameId string, remoteAddr string, isXbox bool, platformUserId uint64, alias string) *MainUser {
9393
if viper.GetBool("GeneratePlatformUserId") {
9494
ipStr, _, err := net.SplitHostPort(remoteAddr)
95-
if err != nil {
95+
if err == nil {
9696
ip := net.ParseIP(ipStr)
9797
if ip != nil {
9898
ipV4 := ip.To4()

0 commit comments

Comments
 (0)