From b5d34d8db40ebf0e74bb73242da61820940a6f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= Date: Sat, 16 Dec 2023 16:09:47 +0000 Subject: [PATCH] Update RMC method creation --- grpc/send_user_notification_wiiu.go | 2 +- nex/account-management/nintendo_create_account.go | 2 +- nex/friends-3ds/add_friendship_by_pid.go | 2 +- nex/friends-3ds/get_all_friends.go | 2 +- nex/friends-3ds/get_friend_mii.go | 2 +- nex/friends-3ds/get_friend_persistent_info.go | 2 +- nex/friends-3ds/get_friend_presence.go | 2 +- nex/friends-3ds/remove_friend_by_pid.go | 2 +- nex/friends-3ds/sync_friend.go | 2 +- nex/friends-3ds/update_comment.go | 2 +- nex/friends-3ds/update_favorite_game_key.go | 2 +- nex/friends-3ds/update_mii.go | 2 +- nex/friends-3ds/update_preference.go | 2 +- nex/friends-3ds/update_presence.go | 2 +- nex/friends-3ds/update_profile.go | 2 +- nex/friends-wiiu/accept_friend_request.go | 2 +- nex/friends-wiiu/add_blacklist.go | 2 +- nex/friends-wiiu/add_friend_request.go | 2 +- nex/friends-wiiu/cancel_friend_request.go | 2 +- nex/friends-wiiu/check_setting_status.go | 2 +- nex/friends-wiiu/delete_friend_request.go | 2 +- nex/friends-wiiu/delete_persistent_notification.go | 2 +- nex/friends-wiiu/deny_friend_request.go | 2 +- nex/friends-wiiu/get_basic_info.go | 2 +- nex/friends-wiiu/get_request_block_settings.go | 2 +- nex/friends-wiiu/mark_friend_requests_as_received.go | 2 +- nex/friends-wiiu/remove_blacklist.go | 2 +- nex/friends-wiiu/remove_friend.go | 2 +- nex/friends-wiiu/update_and_get_all_information.go | 2 +- nex/friends-wiiu/update_comment.go | 2 +- nex/friends-wiiu/update_preference.go | 2 +- nex/friends-wiiu/update_presence.go | 2 +- nex/secure-connection/register_ex.go | 2 +- notifications/3ds/send_comment_update.go | 2 +- notifications/3ds/send_favorite_update.go | 2 +- notifications/3ds/send_friendship_completed.go | 2 +- notifications/3ds/send_mii_notification.go | 2 +- notifications/3ds/send_presence_update.go | 2 +- notifications/3ds/send_user_went_offline.go | 2 +- notifications/wiiu/send_friend_request.go | 2 +- notifications/wiiu/send_friend_request_accepted.go | 2 +- notifications/wiiu/send_friendship_removed.go | 2 +- notifications/wiiu/send_presence_update.go | 2 +- notifications/wiiu/send_user_went_offline.go | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) diff --git a/grpc/send_user_notification_wiiu.go b/grpc/send_user_notification_wiiu.go index 5e1ed5f..fe9e09b 100644 --- a/grpc/send_user_notification_wiiu.go +++ b/grpc/send_user_notification_wiiu.go @@ -15,7 +15,7 @@ func (s *gRPCFriendsServer) SendUserNotificationWiiU(ctx context.Context, in *pb connectedUser := globals.ConnectedUsers[in.GetPid()] if connectedUser != nil { - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent2 diff --git a/nex/account-management/nintendo_create_account.go b/nex/account-management/nintendo_create_account.go index 52ef487..8012c18 100644 --- a/nex/account-management/nintendo_create_account.go +++ b/nex/account-management/nintendo_create_account.go @@ -75,7 +75,7 @@ func NintendoCreateAccount(err error, packet nex.PacketInterface, callID uint32, rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = account_management.ProtocolID rmcResponse.MethodID = account_management.MethodNintendoCreateAccount rmcResponse.CallID = callID diff --git a/nex/friends-3ds/add_friendship_by_pid.go b/nex/friends-3ds/add_friendship_by_pid.go index 2f37b90..111457e 100644 --- a/nex/friends-3ds/add_friendship_by_pid.go +++ b/nex/friends-3ds/add_friendship_by_pid.go @@ -33,7 +33,7 @@ func AddFriendshipByPrincipalID(err error, packet nex.PacketInterface, callID ui rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodAddFriendByPrincipalID rmcResponse.CallID = callID diff --git a/nex/friends-3ds/get_all_friends.go b/nex/friends-3ds/get_all_friends.go index 8854763..46c6cee 100644 --- a/nex/friends-3ds/get_all_friends.go +++ b/nex/friends-3ds/get_all_friends.go @@ -29,7 +29,7 @@ func GetAllFriends(err error, packet nex.PacketInterface, callID uint32) (*nex.R rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodGetAllFriends rmcResponse.CallID = callID diff --git a/nex/friends-3ds/get_friend_mii.go b/nex/friends-3ds/get_friend_mii.go index 97fd5ce..ca609c1 100644 --- a/nex/friends-3ds/get_friend_mii.go +++ b/nex/friends-3ds/get_friend_mii.go @@ -34,7 +34,7 @@ func GetFriendMii(err error, packet nex.PacketInterface, callID uint32, friends rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodGetFriendMii rmcResponse.CallID = callID diff --git a/nex/friends-3ds/get_friend_persistent_info.go b/nex/friends-3ds/get_friend_persistent_info.go index bc6e8d6..afaa15e 100644 --- a/nex/friends-3ds/get_friend_persistent_info.go +++ b/nex/friends-3ds/get_friend_persistent_info.go @@ -35,7 +35,7 @@ func GetFriendPersistentInfo(err error, packet nex.PacketInterface, callID uint3 rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodGetFriendPersistentInfo rmcResponse.CallID = callID diff --git a/nex/friends-3ds/get_friend_presence.go b/nex/friends-3ds/get_friend_presence.go index fff2d15..73a11e9 100644 --- a/nex/friends-3ds/get_friend_presence.go +++ b/nex/friends-3ds/get_friend_presence.go @@ -33,7 +33,7 @@ func GetFriendPresence(err error, packet nex.PacketInterface, callID uint32, pid rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodGetFriendPresence rmcResponse.CallID = callID diff --git a/nex/friends-3ds/remove_friend_by_pid.go b/nex/friends-3ds/remove_friend_by_pid.go index c536cbf..d799a22 100644 --- a/nex/friends-3ds/remove_friend_by_pid.go +++ b/nex/friends-3ds/remove_friend_by_pid.go @@ -31,7 +31,7 @@ func RemoveFriendByPrincipalID(err error, packet nex.PacketInterface, callID uin go notifications_3ds.SendUserWentOffline(client, pid) - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodRemoveFriendByPrincipalID rmcResponse.CallID = callID diff --git a/nex/friends-3ds/sync_friend.go b/nex/friends-3ds/sync_friend.go index ca39f34..9fc53df 100644 --- a/nex/friends-3ds/sync_friend.go +++ b/nex/friends-3ds/sync_friend.go @@ -68,7 +68,7 @@ func SyncFriend(err error, packet nex.PacketInterface, callID uint32, lfc uint64 rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodSyncFriend rmcResponse.CallID = callID diff --git a/nex/friends-3ds/update_comment.go b/nex/friends-3ds/update_comment.go index 062ce92..2cc0b69 100644 --- a/nex/friends-3ds/update_comment.go +++ b/nex/friends-3ds/update_comment.go @@ -24,7 +24,7 @@ func UpdateComment(err error, packet nex.PacketInterface, callID uint32, comment go notifications_3ds.SendCommentUpdate(client, comment) - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodUpdateComment rmcResponse.CallID = callID diff --git a/nex/friends-3ds/update_favorite_game_key.go b/nex/friends-3ds/update_favorite_game_key.go index 1ffab37..b8535d1 100644 --- a/nex/friends-3ds/update_favorite_game_key.go +++ b/nex/friends-3ds/update_favorite_game_key.go @@ -25,7 +25,7 @@ func UpdateFavoriteGameKey(err error, packet nex.PacketInterface, callID uint32, go notifications_3ds.SendFavoriteUpdate(client, gameKey) - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodUpdateFavoriteGameKey rmcResponse.CallID = callID diff --git a/nex/friends-3ds/update_mii.go b/nex/friends-3ds/update_mii.go index f152d6f..70c46b8 100644 --- a/nex/friends-3ds/update_mii.go +++ b/nex/friends-3ds/update_mii.go @@ -25,7 +25,7 @@ func UpdateMii(err error, packet nex.PacketInterface, callID uint32, mii *friend go notifications_3ds.SendMiiUpdateNotification(client) - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodUpdateMii rmcResponse.CallID = callID diff --git a/nex/friends-3ds/update_preference.go b/nex/friends-3ds/update_preference.go index 822b3a0..969bf90 100644 --- a/nex/friends-3ds/update_preference.go +++ b/nex/friends-3ds/update_preference.go @@ -33,7 +33,7 @@ func UpdatePreference(err error, packet nex.PacketInterface, callID uint32, show notifications_3ds.SendUserWentOfflineGlobally(client) } - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodUpdatePreference rmcResponse.CallID = callID diff --git a/nex/friends-3ds/update_presence.go b/nex/friends-3ds/update_presence.go index f86747a..9019f7a 100644 --- a/nex/friends-3ds/update_presence.go +++ b/nex/friends-3ds/update_presence.go @@ -42,7 +42,7 @@ func UpdatePresence(err error, packet nex.PacketInterface, callID uint32, presen globals.ConnectedUsers[pid].Presence = currentPresence - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodUpdatePresence rmcResponse.CallID = callID diff --git a/nex/friends-3ds/update_profile.go b/nex/friends-3ds/update_profile.go index d91ce4f..3bffafc 100644 --- a/nex/friends-3ds/update_profile.go +++ b/nex/friends-3ds/update_profile.go @@ -22,7 +22,7 @@ func UpdateProfile(err error, packet nex.PacketInterface, callID uint32, profile return nil, nex.Errors.FPD.Unknown } - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_3ds.ProtocolID rmcResponse.MethodID = friends_3ds.MethodUpdateProfile rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/accept_friend_request.go b/nex/friends-wiiu/accept_friend_request.go index f6f5e55..7e2fbfc 100644 --- a/nex/friends-wiiu/accept_friend_request.go +++ b/nex/friends-wiiu/accept_friend_request.go @@ -61,7 +61,7 @@ func AcceptFriendRequest(err error, packet nex.PacketInterface, callID uint32, i rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodAcceptFriendRequest rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/add_blacklist.go b/nex/friends-wiiu/add_blacklist.go index fca15c6..8368e11 100644 --- a/nex/friends-wiiu/add_blacklist.go +++ b/nex/friends-wiiu/add_blacklist.go @@ -49,7 +49,7 @@ func AddBlacklist(err error, packet nex.PacketInterface, callID uint32, blacklis rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodAddBlackList rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/add_friend_request.go b/nex/friends-wiiu/add_friend_request.go index 8fb72eb..2330636 100644 --- a/nex/friends-wiiu/add_friend_request.go +++ b/nex/friends-wiiu/add_friend_request.go @@ -143,7 +143,7 @@ func AddFriendRequest(err error, packet nex.PacketInterface, callID uint32, pid rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodAddFriendRequest rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/cancel_friend_request.go b/nex/friends-wiiu/cancel_friend_request.go index aeff482..bba6904 100644 --- a/nex/friends-wiiu/cancel_friend_request.go +++ b/nex/friends-wiiu/cancel_friend_request.go @@ -33,7 +33,7 @@ func CancelFriendRequest(err error, packet nex.PacketInterface, callID uint32, i go notifications_wiiu.SendFriendshipRemoved(connectedUser.Client, client.PID()) } - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodCancelFriendRequest rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/check_setting_status.go b/nex/friends-wiiu/check_setting_status.go index 7a13ae1..aae4c4a 100644 --- a/nex/friends-wiiu/check_setting_status.go +++ b/nex/friends-wiiu/check_setting_status.go @@ -18,7 +18,7 @@ func CheckSettingStatus(err error, packet nex.PacketInterface, callID uint32) (* rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodCheckSettingStatus rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/delete_friend_request.go b/nex/friends-wiiu/delete_friend_request.go index 628fce3..a34cbe3 100644 --- a/nex/friends-wiiu/delete_friend_request.go +++ b/nex/friends-wiiu/delete_friend_request.go @@ -24,7 +24,7 @@ func DeleteFriendRequest(err error, packet nex.PacketInterface, callID uint32, i } } - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodDeleteFriendRequest rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/delete_persistent_notification.go b/nex/friends-wiiu/delete_persistent_notification.go index 1815a10..021822e 100644 --- a/nex/friends-wiiu/delete_persistent_notification.go +++ b/nex/friends-wiiu/delete_persistent_notification.go @@ -15,7 +15,7 @@ func DeletePersistentNotification(err error, packet nex.PacketInterface, callID // TODO - Do something here - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodDeletePersistentNotification rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/deny_friend_request.go b/nex/friends-wiiu/deny_friend_request.go index b22c4db..0dd4ce0 100644 --- a/nex/friends-wiiu/deny_friend_request.go +++ b/nex/friends-wiiu/deny_friend_request.go @@ -64,7 +64,7 @@ func DenyFriendRequest(err error, packet nex.PacketInterface, callID uint32, id rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodDenyFriendRequest rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/get_basic_info.go b/nex/friends-wiiu/get_basic_info.go index e8607fe..154875a 100644 --- a/nex/friends-wiiu/get_basic_info.go +++ b/nex/friends-wiiu/get_basic_info.go @@ -36,7 +36,7 @@ func GetBasicInfo(err error, packet nex.PacketInterface, callID uint32, pids []* rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodGetBasicInfo rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/get_request_block_settings.go b/nex/friends-wiiu/get_request_block_settings.go index eb5c75a..75d4b52 100644 --- a/nex/friends-wiiu/get_request_block_settings.go +++ b/nex/friends-wiiu/get_request_block_settings.go @@ -42,7 +42,7 @@ func GetRequestBlockSettings(err error, packet nex.PacketInterface, callID uint3 rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodGetRequestBlockSettings rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/mark_friend_requests_as_received.go b/nex/friends-wiiu/mark_friend_requests_as_received.go index b4fcbdc..d3c6290 100644 --- a/nex/friends-wiiu/mark_friend_requests_as_received.go +++ b/nex/friends-wiiu/mark_friend_requests_as_received.go @@ -22,7 +22,7 @@ func MarkFriendRequestsAsReceived(err error, packet nex.PacketInterface, callID } } - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodMarkFriendRequestsAsReceived rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/remove_blacklist.go b/nex/friends-wiiu/remove_blacklist.go index 183207e..5c11732 100644 --- a/nex/friends-wiiu/remove_blacklist.go +++ b/nex/friends-wiiu/remove_blacklist.go @@ -26,7 +26,7 @@ func RemoveBlacklist(err error, packet nex.PacketInterface, callID uint32, block } } - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodRemoveBlackList rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/remove_friend.go b/nex/friends-wiiu/remove_friend.go index c26d636..30335a1 100644 --- a/nex/friends-wiiu/remove_friend.go +++ b/nex/friends-wiiu/remove_friend.go @@ -32,7 +32,7 @@ func RemoveFriend(err error, packet nex.PacketInterface, callID uint32, pid *nex go notifications_wiiu.SendFriendshipRemoved(connectedUser.Client, pid) } - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodRemoveFriend rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/update_and_get_all_information.go b/nex/friends-wiiu/update_and_get_all_information.go index 935b6f0..78add28 100644 --- a/nex/friends-wiiu/update_and_get_all_information.go +++ b/nex/friends-wiiu/update_and_get_all_information.go @@ -255,7 +255,7 @@ func UpdateAndGetAllInformation(err error, packet nex.PacketInterface, callID ui rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodUpdateAndGetAllInformation rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/update_comment.go b/nex/friends-wiiu/update_comment.go index 681abc4..a9304db 100644 --- a/nex/friends-wiiu/update_comment.go +++ b/nex/friends-wiiu/update_comment.go @@ -28,7 +28,7 @@ func UpdateComment(err error, packet nex.PacketInterface, callID uint32, comment rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodUpdateComment rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/update_preference.go b/nex/friends-wiiu/update_preference.go index 20fa262..a6d85b4 100644 --- a/nex/friends-wiiu/update_preference.go +++ b/nex/friends-wiiu/update_preference.go @@ -22,7 +22,7 @@ func UpdatePreference(err error, packet nex.PacketInterface, callID uint32, prin return nil, nex.Errors.FPD.Unknown } - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodUpdatePreference rmcResponse.CallID = callID diff --git a/nex/friends-wiiu/update_presence.go b/nex/friends-wiiu/update_presence.go index e7c546d..5ba5609 100644 --- a/nex/friends-wiiu/update_presence.go +++ b/nex/friends-wiiu/update_presence.go @@ -37,7 +37,7 @@ func UpdatePresence(err error, packet nex.PacketInterface, callID uint32, presen notifications_wiiu.SendPresenceUpdate(presence) - rmcResponse := nex.NewRMCSuccess(nil) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, nil) rmcResponse.ProtocolID = friends_wiiu.ProtocolID rmcResponse.MethodID = friends_wiiu.MethodUpdatePresence rmcResponse.CallID = callID diff --git a/nex/secure-connection/register_ex.go b/nex/secure-connection/register_ex.go index e24fb53..691adcc 100644 --- a/nex/secure-connection/register_ex.go +++ b/nex/secure-connection/register_ex.go @@ -80,7 +80,7 @@ func RegisterEx(err error, packet nex.PacketInterface, callID uint32, stationUrl rmcResponseBody := rmcResponseStream.Bytes() - rmcResponse := nex.NewRMCSuccess(rmcResponseBody) + rmcResponse := nex.NewRMCSuccess(globals.SecureServer, rmcResponseBody) rmcResponse.ProtocolID = secure_connection.ProtocolID rmcResponse.MethodID = secure_connection.MethodRegisterEx rmcResponse.CallID = callID diff --git a/notifications/3ds/send_comment_update.go b/notifications/3ds/send_comment_update.go index f6990ee..cf8beb5 100644 --- a/notifications/3ds/send_comment_update.go +++ b/notifications/3ds/send_comment_update.go @@ -24,7 +24,7 @@ func SendCommentUpdate(client *nex.PRUDPClient, comment string) { stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1 diff --git a/notifications/3ds/send_favorite_update.go b/notifications/3ds/send_favorite_update.go index 07b6874..5dbfa5c 100644 --- a/notifications/3ds/send_favorite_update.go +++ b/notifications/3ds/send_favorite_update.go @@ -22,7 +22,7 @@ func SendFavoriteUpdate(client *nex.PRUDPClient, gameKey *friends_3ds_types.Game stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1 diff --git a/notifications/3ds/send_friendship_completed.go b/notifications/3ds/send_friendship_completed.go index 9caedf0..fa15060 100644 --- a/notifications/3ds/send_friendship_completed.go +++ b/notifications/3ds/send_friendship_completed.go @@ -23,7 +23,7 @@ func SendFriendshipCompleted(client *nex.PRUDPClient, friendPID uint32, senderPI stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1 diff --git a/notifications/3ds/send_mii_notification.go b/notifications/3ds/send_mii_notification.go index 958acef..c8c0bfb 100644 --- a/notifications/3ds/send_mii_notification.go +++ b/notifications/3ds/send_mii_notification.go @@ -23,7 +23,7 @@ func SendMiiUpdateNotification(client *nex.PRUDPClient) { stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1 diff --git a/notifications/3ds/send_presence_update.go b/notifications/3ds/send_presence_update.go index 142526c..07feb0c 100644 --- a/notifications/3ds/send_presence_update.go +++ b/notifications/3ds/send_presence_update.go @@ -22,7 +22,7 @@ func SendPresenceUpdate(client *nex.PRUDPClient, presence *friends_3ds_types.Nin stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1 diff --git a/notifications/3ds/send_user_went_offline.go b/notifications/3ds/send_user_went_offline.go index 46ab72a..239a1b8 100644 --- a/notifications/3ds/send_user_went_offline.go +++ b/notifications/3ds/send_user_went_offline.go @@ -34,7 +34,7 @@ func SendUserWentOffline(client *nex.PRUDPClient, pid *nex.PID) { stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1 diff --git a/notifications/wiiu/send_friend_request.go b/notifications/wiiu/send_friend_request.go index a777db3..6988b24 100644 --- a/notifications/wiiu/send_friend_request.go +++ b/notifications/wiiu/send_friend_request.go @@ -19,7 +19,7 @@ func SendFriendRequest(client *nex.PRUDPClient, friendRequestNotificationData *f stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent2 diff --git a/notifications/wiiu/send_friend_request_accepted.go b/notifications/wiiu/send_friend_request_accepted.go index 3ff9653..33e2086 100644 --- a/notifications/wiiu/send_friend_request_accepted.go +++ b/notifications/wiiu/send_friend_request_accepted.go @@ -19,7 +19,7 @@ func SendFriendRequestAccepted(client *nex.PRUDPClient, friendInfo *friends_wiiu stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1 diff --git a/notifications/wiiu/send_friendship_removed.go b/notifications/wiiu/send_friendship_removed.go index fd76381..42ec455 100644 --- a/notifications/wiiu/send_friendship_removed.go +++ b/notifications/wiiu/send_friendship_removed.go @@ -20,7 +20,7 @@ func SendFriendshipRemoved(client *nex.PRUDPClient, senderPID *nex.PID) { stream := nex.NewStreamOut(globals.SecureServer) stream.WriteStructure(eventObject) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1 diff --git a/notifications/wiiu/send_presence_update.go b/notifications/wiiu/send_presence_update.go index d8c3fc1..85bf131 100644 --- a/notifications/wiiu/send_presence_update.go +++ b/notifications/wiiu/send_presence_update.go @@ -23,7 +23,7 @@ func SendPresenceUpdate(presence *friends_wiiu_types.NintendoPresenceV2) { stream := nex.NewStreamOut(globals.SecureServer) eventObjectBytes := eventObject.Bytes(stream) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent2 diff --git a/notifications/wiiu/send_user_went_offline.go b/notifications/wiiu/send_user_went_offline.go index a21d379..b668068 100644 --- a/notifications/wiiu/send_user_went_offline.go +++ b/notifications/wiiu/send_user_went_offline.go @@ -40,7 +40,7 @@ func SendUserWentOffline(client *nex.PRUDPClient, pid *nex.PID) { stream := nex.NewStreamOut(globals.SecureServer) stream.WriteStructure(eventObject) - rmcRequest := nex.NewRMCRequest() + rmcRequest := nex.NewRMCRequest(globals.SecureServer) rmcRequest.ProtocolID = nintendo_notifications.ProtocolID rmcRequest.CallID = 3810693103 rmcRequest.MethodID = nintendo_notifications.MethodProcessNintendoNotificationEvent1