mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 15:27:43 +00:00
Remove DebugHello
This commit is contained in:
parent
9594bda74a
commit
7d5fee46bd
1 changed files with 0 additions and 14 deletions
|
@ -110,31 +110,20 @@ func callHandler(handler CommandHandler, conn *websocket.Conn, client *ClientInf
|
||||||
return handler(conn, client, cmsg)
|
return handler(conn, client, cmsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
var DebugHello = ""
|
|
||||||
|
|
||||||
// C2SHello implements the `hello` C2S Command.
|
// C2SHello implements the `hello` C2S Command.
|
||||||
// It calls SubscribeGlobal() and SubscribeDefaults() with the client, and fills out ClientInfo.Version and ClientInfo.ClientID.
|
// It calls SubscribeGlobal() and SubscribeDefaults() with the client, and fills out ClientInfo.Version and ClientInfo.ClientID.
|
||||||
func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg ClientMessage, err error) {
|
func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg ClientMessage, err error) {
|
||||||
ary, ok := msg.Arguments.([]interface{})
|
ary, ok := msg.Arguments.([]interface{})
|
||||||
if !ok {
|
if !ok {
|
||||||
if DebugHello != "" {
|
|
||||||
fmt.Println("Hello error: was not an array:", ary)
|
|
||||||
}
|
|
||||||
err = ErrExpectedTwoStrings
|
err = ErrExpectedTwoStrings
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(ary) != 2 {
|
if len(ary) != 2 {
|
||||||
if DebugHello != "" {
|
|
||||||
fmt.Println("Hello error: array wrong length:", ary)
|
|
||||||
}
|
|
||||||
err = ErrExpectedTwoStrings
|
err = ErrExpectedTwoStrings
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
version, ok := ary[0].(string)
|
version, ok := ary[0].(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
if DebugHello != "" {
|
|
||||||
fmt.Println("Hello error: version not a string:", ary)
|
|
||||||
}
|
|
||||||
err = ErrExpectedTwoStrings
|
err = ErrExpectedTwoStrings
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -151,9 +140,6 @@ func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg
|
||||||
} else if ary[1] == nil {
|
} else if ary[1] == nil {
|
||||||
clientID = uuid.NewV4()
|
clientID = uuid.NewV4()
|
||||||
} else {
|
} else {
|
||||||
if DebugHello != "" {
|
|
||||||
fmt.Println("Hello error: client id not acceptable:", ary)
|
|
||||||
}
|
|
||||||
err = ErrExpectedTwoStrings
|
err = ErrExpectedTwoStrings
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue