From 60ff336abd53c8a2d375d17397e9637e4cea2feb Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 29 Dec 2021 14:56:14 +0100 Subject: [PATCH] reply handling --- serverCommunication/web.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/serverCommunication/web.go b/serverCommunication/web.go index 537c5a7..b5143d2 100644 --- a/serverCommunication/web.go +++ b/serverCommunication/web.go @@ -27,6 +27,19 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, status in return } + if status == kraProtocol.StatusReply { + // TODO: TODO: handling reply + + if isVoice { + if isCmdIDInList(webClient.VoiceCmdIDs, cmdID) { + webClient.RemoveVoiceCmdID(cmdID) + } else { + webClient.RemoveMobileCmdID(cmdID) + } + } + return + } + // ack if status == kraProtocol.StatusGet { var cmdIDInList bool @@ -62,8 +75,8 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, status in } return } - // no ack + // no ack if dest == kraProtocol.DestProxy || dest == kraProtocol.DestPlayersCurrentServer { // forwarding message to java / minecraft err = SendMessageToMinecraftServer(status, dest, uuid, cmdNumber, args)