mirror of
https://github.com/PretendoNetwork/friends.git
synced 2026-04-24 23:07:13 -05:00
37 lines
1007 B
Go
37 lines
1007 B
Go
package main
|
|
|
|
import (
|
|
nex "github.com/PretendoNetwork/nex-go"
|
|
nexproto "github.com/PretendoNetwork/nex-protocols-go"
|
|
)
|
|
|
|
func updateCommentWiiU(err error, client *nex.Client, callID uint32, comment *nexproto.Comment) {
|
|
// TODO: Do something with this
|
|
|
|
changed := updateUserComment(client.PID(), comment.Contents)
|
|
|
|
rmcResponseStream := nex.NewStreamOut(nexServer)
|
|
|
|
rmcResponseStream.WriteUInt64LE(changed)
|
|
|
|
rmcResponseBody := rmcResponseStream.Bytes()
|
|
|
|
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
|
rmcResponse.SetSuccess(nexproto.FriendsMethodUpdateComment, rmcResponseBody)
|
|
|
|
rmcResponseBytes := rmcResponse.Bytes()
|
|
|
|
responsePacket, _ := nex.NewPacketV0(client, nil)
|
|
|
|
responsePacket.SetVersion(0)
|
|
responsePacket.SetSource(0xA1)
|
|
responsePacket.SetDestination(0xAF)
|
|
responsePacket.SetType(nex.DataPacket)
|
|
responsePacket.SetPayload(rmcResponseBytes)
|
|
|
|
responsePacket.AddFlag(nex.FlagNeedsAck)
|
|
responsePacket.AddFlag(nex.FlagReliable)
|
|
|
|
nexServer.Send(responsePacket)
|
|
}
|