1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00

Remove feature switch for not giving server time in reply

This commit is contained in:
Kane York 2016-04-20 13:45:59 -07:00
parent 74270245ab
commit d7ea9d610b

View file

@ -107,8 +107,6 @@ func callHandler(handler CommandHandler, conn *websocket.Conn, client *ClientInf
return handler(conn, client, cmsg)
}
var lastVersionWithoutReplyWithServerTime = VersionFromString("ffz_3.5.78")
// 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) {
@ -130,19 +128,13 @@ func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg
SubscribeGlobal(client)
SubscribeDefaults(client)
if client.Version.After(&lastVersionWithoutReplyWithServerTime) {
jsTime := float64(time.Now().UnixNano()/1000) / 1000
return ClientMessage{
Arguments: []interface{}{
client.ClientID.String(),
jsTime,
},
}, nil
} else {
return ClientMessage{
Arguments: client.ClientID.String(),
}, nil
}
jsTime := float64(time.Now().UnixNano()/1000) / 1000
return ClientMessage{
Arguments: []interface{}{
client.ClientID.String(),
jsTime,
},
}, nil
}
func C2SPing(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg ClientMessage, err error) {