mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +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)
|
||||
}
|
||||
|
||||
var DebugHello = ""
|
||||
|
||||
// C2SHello implements the `hello` C2S Command.
|
||||
// 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) {
|
||||
ary, ok := msg.Arguments.([]interface{})
|
||||
if !ok {
|
||||
if DebugHello != "" {
|
||||
fmt.Println("Hello error: was not an array:", ary)
|
||||
}
|
||||
err = ErrExpectedTwoStrings
|
||||
return
|
||||
}
|
||||
if len(ary) != 2 {
|
||||
if DebugHello != "" {
|
||||
fmt.Println("Hello error: array wrong length:", ary)
|
||||
}
|
||||
err = ErrExpectedTwoStrings
|
||||
return
|
||||
}
|
||||
version, ok := ary[0].(string)
|
||||
if !ok {
|
||||
if DebugHello != "" {
|
||||
fmt.Println("Hello error: version not a string:", ary)
|
||||
}
|
||||
err = ErrExpectedTwoStrings
|
||||
return
|
||||
}
|
||||
|
@ -151,9 +140,6 @@ func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg
|
|||
} else if ary[1] == nil {
|
||||
clientID = uuid.NewV4()
|
||||
} else {
|
||||
if DebugHello != "" {
|
||||
fmt.Println("Hello error: client id not acceptable:", ary)
|
||||
}
|
||||
err = ErrExpectedTwoStrings
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue