Skip to content

Commit

Permalink
Update libraries and notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntii committed Jul 6, 2023
1 parent db87099 commit f8192ce
Show file tree
Hide file tree
Showing 26 changed files with 49 additions and 461 deletions.
21 changes: 0 additions & 21 deletions database/add_player_session.go

This file was deleted.

18 changes: 0 additions & 18 deletions database/delete_player_session.go

This file was deleted.

27 changes: 0 additions & 27 deletions database/does_session_exist.go

This file was deleted.

19 changes: 0 additions & 19 deletions database/get_all_session_pids.go

This file was deleted.

30 changes: 0 additions & 30 deletions database/get_player_session_address.go

This file was deleted.

28 changes: 0 additions & 28 deletions database/get_player_urls.go

This file was deleted.

29 changes: 0 additions & 29 deletions database/update_player_session_all.go

This file was deleted.

26 changes: 0 additions & 26 deletions database/update_player_session_port.go

This file was deleted.

43 changes: 0 additions & 43 deletions database/update_player_session_url.go

This file was deleted.

12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.18

require (
github.com/PretendoNetwork/grpc-go v1.0.1
github.com/PretendoNetwork/nex-go v1.0.26
github.com/PretendoNetwork/nex-protocols-common-go v1.0.17
github.com/PretendoNetwork/nex-protocols-go v1.0.29
github.com/PretendoNetwork/plogger-go v1.0.2
github.com/PretendoNetwork/nex-go v1.0.28
github.com/PretendoNetwork/nex-protocols-common-go v1.0.22
github.com/PretendoNetwork/nex-protocols-go v1.0.38
github.com/PretendoNetwork/plogger-go v1.0.3
github.com/joho/godotenv v1.5.1
go.mongodb.org/mongo-driver v1.11.4
google.golang.org/grpc v1.48.0
Expand All @@ -31,8 +31,8 @@ require (
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.9.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/protobuf v1.28.1 // indirect
Expand Down
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ github.com/PretendoNetwork/grpc-go v1.0.1 h1:3O0n4vnRX9rAZfrrjZydDjEOyWb4TbJcvwM
github.com/PretendoNetwork/grpc-go v1.0.1/go.mod h1:XZjEsij9lL7HJBNkH6JPbBIkUSq/1rjflvjGdv+DAj0=
github.com/PretendoNetwork/nex-go v1.0.26 h1:lJqDS5F8s836xcQzCEI5hNvUesmTsh2NGDC4tZvG250=
github.com/PretendoNetwork/nex-go v1.0.26/go.mod h1:qzc5s4iNrt1ubS9Axb38b2jPuEsiETN2mDijn+MthmI=
github.com/PretendoNetwork/nex-go v1.0.28 h1:g3892srP1T7LaeY5JklMtLZ03gTxE8wpXqpPQpXpN74=
github.com/PretendoNetwork/nex-go v1.0.28/go.mod h1:tWfWhrC/DCJuS08jTk0ceOv2R1VtElvKSVv13To6miE=
github.com/PretendoNetwork/nex-protocols-common-go v1.0.17 h1:w0n+RJAHANgX/iVnL5qRiyPJeDHcwr8w6DzDeFqxkqk=
github.com/PretendoNetwork/nex-protocols-common-go v1.0.17/go.mod h1:5Y3jRIbvDxasj0CIvd024za+t9LMbD0OZkBwyKICijg=
github.com/PretendoNetwork/nex-protocols-common-go v1.0.22 h1:oIKx3AsBApaKWl1f91q/Vt59YKJOjoUhzxs/F0UA1Vw=
github.com/PretendoNetwork/nex-protocols-common-go v1.0.22/go.mod h1:UwVHUdB1WFlzVn4yq8WLai0J+9OQXw4cg5qNjnJQ3RU=
github.com/PretendoNetwork/nex-protocols-go v1.0.29 h1:sye/cpRHpDuoV1I+vpeTBIEXaKsJ5biK/+zo3O92dlY=
github.com/PretendoNetwork/nex-protocols-go v1.0.29/go.mod h1:Pw1u2rsZGXuv45iM9y/7nZ5TBr1L5hctv9ylNXlW1ws=
github.com/PretendoNetwork/nex-protocols-go v1.0.38 h1:DCzzlIx8NJlTLcfisqeVg4vXTKvIVe0kF1cXzDBz6p8=
github.com/PretendoNetwork/nex-protocols-go v1.0.38/go.mod h1:jZSnoM2G4oc7tKXeUf2OkJ6VyfJc4nb7gR++2oNEh5A=
github.com/PretendoNetwork/plogger-go v1.0.2 h1:vWKEnEmJJzYwqLxLyiSsAvCrZV6qnnu/a0GQOjIfzY0=
github.com/PretendoNetwork/plogger-go v1.0.2/go.mod h1:7kD6M4vPq1JL4LTuPg6kuB1OvUBOwQOtAvTaUwMbwvU=
github.com/PretendoNetwork/plogger-go v1.0.3 h1:KEnrUfPaCn0LFweg8OrhtiDhlN3pclWpNhlmAtmgfB0=
github.com/PretendoNetwork/plogger-go v1.0.3/go.mod h1:7kD6M4vPq1JL4LTuPg6kuB1OvUBOwQOtAvTaUwMbwvU=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down Expand Up @@ -165,11 +173,15 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28=
golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
9 changes: 5 additions & 4 deletions grpc/send_incoming_call_notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (

pb "github.com/PretendoNetwork/grpc-go/friends"
nex "github.com/PretendoNetwork/nex-go"
friends_wiiu "github.com/PretendoNetwork/nex-protocols-go/friends/wiiu"
friends_wiiu_types "github.com/PretendoNetwork/nex-protocols-go/friends-wiiu/types"
nintendo_notifications "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications"
nintendo_notifications_types "github.com/PretendoNetwork/nex-protocols-go/nintendo-notifications/types"
"github.com/PretendoNetwork/wiiu-chat-secure/globals"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
Expand All @@ -33,11 +34,11 @@ func SendIncomingCallNotification(caller uint32, target uint32) {

ctx := metadata.NewOutgoingContext(context.Background(), md)

presence := friends_wiiu.NewNintendoPresenceV2()
presence := friends_wiiu_types.NewNintendoPresenceV2()

presence.ChangedFlags = 0x1FF
presence.Online = true
presence.GameKey = friends_wiiu.NewGameKey()
presence.GameKey = friends_wiiu_types.NewGameKey()
presence.Unknown2 = 0x65
presence.GameServerID = 0x1005A000
presence.PID = 4 // This is not a PID.
Expand All @@ -52,7 +53,7 @@ func SendIncomingCallNotification(caller uint32, target uint32) {
presence.GameKey.TitleID = 0x000500101005A100
presence.GameKey.TitleVersion = 55

eventObject := nintendo_notifications.NewNintendoNotificationEvent()
eventObject := nintendo_notifications_types.NewNintendoNotificationEvent()
eventObject.Type = nintendo_notifications.NotificationTypes.FriendStartedTitle
eventObject.SenderPID = caller
eventObject.DataHolder = nex.NewDataHolder()
Expand Down
3 changes: 2 additions & 1 deletion nex/match-making/find_by_single_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package nex_match_making
import (
nex "github.com/PretendoNetwork/nex-go"
match_making "github.com/PretendoNetwork/nex-protocols-go/match-making"
match_making_types "github.com/PretendoNetwork/nex-protocols-go/match-making/types"
"github.com/PretendoNetwork/wiiu-chat-secure/globals"
)

Expand All @@ -11,7 +12,7 @@ func FindBySingleID(err error, client *nex.Client, callID uint32, id uint32) {

result := true

gathering := match_making.NewGathering()
gathering := match_making_types.NewGathering()
gathering.ID = id
gathering.OwnerPID = caller
gathering.HostPID = caller
Expand Down
2 changes: 1 addition & 1 deletion nex/match-making/get_session_urls.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func GetSessionUrls(err error, client *nex.Client, callID uint32, gid uint32) {

hostpid, _, _ := database.GetCallInfoByCaller(gid)

stationUrlStrings = database.GetPlayerURLs(hostpid)
stationUrlStrings = globals.NEXServer.FindClientFromPID(hostpid).StationURLs()

rmcResponseStream := nex.NewStreamOut(globals.NEXServer)
rmcResponseStream.WriteListString(stationUrlStrings)
Expand Down
Loading

0 comments on commit f8192ce

Please sign in to comment.