1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 10:06:54 +00:00

Assign new client ID when null

This commit is contained in:
Kane York 2017-09-15 12:58:14 -07:00
parent e0b5d92671
commit 42c82251be

View file

@ -136,9 +136,11 @@ func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg
if client.ClientID == uuid.Nil { if client.ClientID == uuid.Nil {
client.ClientID = uuid.NewV4() client.ClientID = uuid.NewV4()
} }
} else if _, ok := ary[1].(bool); (ok || ary[1] == nil) { } else if _, ok := ary[1].(bool); ok {
// opt out // opt out
client.ClientID = AnonymousClientID client.ClientID = AnonymousClientID
} else if ary[1] == nil {
client.ClientID = uuid.NewV4()
} else { } else {
err = ErrExpectedTwoStrings err = ErrExpectedTwoStrings
return return