mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-03 16:38:31 +00:00
Assign new client ID when null
This commit is contained in:
parent
e0b5d92671
commit
42c82251be
1 changed files with 3 additions and 1 deletions
|
@ -136,9 +136,11 @@ func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg
|
|||
if client.ClientID == uuid.Nil {
|
||||
client.ClientID = uuid.NewV4()
|
||||
}
|
||||
} else if _, ok := ary[1].(bool); (ok || ary[1] == nil) {
|
||||
} else if _, ok := ary[1].(bool); ok {
|
||||
// opt out
|
||||
client.ClientID = AnonymousClientID
|
||||
} else if ary[1] == nil {
|
||||
client.ClientID = uuid.NewV4()
|
||||
} else {
|
||||
err = ErrExpectedTwoStrings
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue