Commit graph

47 commits

Author SHA1 Message Date
Jonathan Barrow
8432cfd6d5
feat: update to latest NEX libs 2025-02-15 23:31:32 -05:00
Daniel López Guimaraes
120776e197
fix: Better initialization of NEX server accounts
Initializing the server accounts in their own thread (e.g. the
authentication and secure servers) can cause a race condition where the
secure account hasn't been set up yet when authentication configures
`ticket-granting`, causing sometimes crashes on startup.

This has happened on production causing unnecesary restarts. To fix
this, initialize the accounts on the `init` function to ensure they will
always be accessible when needed.
2024-10-29 23:01:59 +00:00
Jonathan Barrow
d5f7bb67b4
Merge pull request #19 from DaniElectra/mii-character-set 2024-05-20 17:12:39 -04:00
Daniel López Guimaraes
f9071cbed3
feat: Update modules and new Mii database fields
Add Mii profanity flag and character set to the 3DS friends database.
This in theory allows better support of Mii names that use characters
exclusive to the following regions: CHN, KOR or TWN.

Also get the Mii changed timestamp from the database, and not use the
current time for it.

Update the go modules to get the latest stability updates and use the
new fields on the Mii structure.
2024-05-20 21:55:56 +01:00
Daniel López Guimaraes
ab80949173
fix(3ds): Send friendship notification to proper target
The sender PID of the notification was being set to the target PID,
instead of the sender PID. Use correct PID and remove redundant target
PID argument.

Also fix minor accuracy issues.
2024-05-20 21:48:10 +01:00
Jonathan Barrow
7bc3dbf4f1
fix: use Copy() on presence data to get around race condition 2024-05-16 07:43:26 -04:00
Jonathan Barrow
9855dea445
refactor(wiiu): dont track NNAInfo in user state, use the DB 2024-05-12 15:56:24 -04:00
Jonathan Barrow
9e5a02d286
wiiu: fix nil connectedUser not being updated 2024-04-09 12:45:11 -04:00
Jonathan Barrow
18e1a0fefa
chore: migrate ConnectedUser map to MutexMap 2024-04-09 12:21:50 -04:00
Jonathan Barrow
d6fdde6161
chore: add guest account 2024-04-08 16:23:06 -04:00
Jonathan Barrow
491b475a9c
chore: remove debug logging 2024-04-08 16:09:43 -04:00
Jonathan Barrow
4d299a3612
rewrite: Migrate to v2 libraries and small bug fixes 2024-04-08 08:53:39 -04:00
Daniel López Guimaraes
b5d34d8db4
Update RMC method creation 2023-12-16 16:09:47 +00:00
Daniel López Guimaraes
e3da081f52
Update with latest changes 2023-12-14 23:25:28 +00:00
Daniel López Guimaraes
1a6b641543
Update with latest changes 2023-12-10 19:46:09 +00:00
Jonathan Barrow
1596eeea45
updated StationURL handling 2023-11-24 17:41:31 -05:00
Jonathan Barrow
90a71d2ca2
updated to new stream functions 2023-11-18 15:25:50 -05:00
Daniel López Guimaraes
7281dd5a52
Replace slices.Contains to Equals check
We can't use slices.Contains anymore since now we are comparing
pointers, and the check would always return false. Replace with using
the Equals function.
2023-11-17 19:22:08 +00:00
Jonathan Barrow
abb19ddf43
make 3DS friends display as online again 2023-11-16 16:24:06 -05:00
Jonathan Barrow
de11455a1b
use new PID, DateTime and method returns 2023-11-14 22:47:52 -05:00
Jonathan Barrow
cb82df0e20
use new PID type 2023-11-13 01:22:34 -05:00
Jonathan Barrow
91b13c31a4
work with new nex-go 2023-11-12 06:48:13 -05:00
Daniel López Guimaraes
77a1cc11aa
Add missing error handling (part 2) 2023-08-15 20:59:12 +01:00
Daniel López Guimaraes
06d89d8b77
Add missing error handling and update modules 2023-08-15 20:56:01 +01:00
Daniel López Guimaraes
84566dd6a8
Move GetUserDataByPID to utility 2023-08-14 13:17:48 +01:00
Daniel López Guimaraes
2d1e087fac
Replace stubs with NotImplemented 2023-08-13 23:28:44 +01:00
Daniel López Guimaraes
8d8a05a7e2
Add missing error handling
Now database getters do error handling aswell, and in case of any error,
the NEX or GRPC method throws a proper error about it.

There are still some doubts on how to handle errors when a list of data
is processed, so for now skip that element on the list and continue.

Also add some constant errors to do better error handling.
2023-08-13 23:19:34 +01:00
Daniel López Guimaraes
2f80336681
Rename friends-secure to friends and remove Mongo
Replace MongoDB usage with GRPC calls to the account server. Also
include documentation on the README and a Makefile.
2023-08-13 01:05:08 +01:00
Daniel López Guimaraes
3d5e78f532
Improve error handling
Now that we can return errors to nex-protocols-go and it will handle it,
we can improve how errors are being handled in friends.

There's probably room for improvement from this, since I haven't added
error handling on some database getters due to uncertainties on whether
the error should interrupt an action or not.
2023-08-12 23:53:21 +01:00
SuperMarioDaBom
5a62bb2aa2 Fix typo (v1->v0) 2023-07-18 11:41:18 -07:00
SuperMarioDaBom
4108f4baad Convert to modern result code handling 2023-07-18 11:41:01 -07:00
SuperMarioDaBom
1779a4c727 Add RegisterEx override, remove unneeded Register function 2023-07-18 11:40:36 -07:00
SuperMarioDaBom
c5a6b31d68 Remove unnecessary function call, fix typo 2023-07-18 11:34:54 -07:00
SuperMarioDaBom
2583592ab3 Enable insecure login 2023-07-18 11:33:18 -07:00
SuperMarioDaBom
4274963c20 Use sprintf for string concatenation 2023-07-17 18:37:58 -07:00
SuperMarioDaBom
7d80142f0f Switch to new organization convention 2023-07-17 18:37:41 -07:00
SuperMarioDaBom
4b7cbb3668
Update secure.go
Add version numbers
Fix Kerberos password thing that I just noticed
2023-07-17 12:16:20 -07:00
SuperMarioDaBom
ca71cb56f6
Update authentication.go
Set NEX version
2023-07-17 12:11:50 -07:00
SuperMarioDaBom
a817a7ccd0 Merge authentication and secure servers 2023-07-16 21:20:04 -07:00
SuperMarioDaBom
1b43935ea6 Update to latest version of libraries 2023-07-16 21:19:30 -07:00
Jonathan Barrow
4587a217f9
Added missing nil checks to ConnectedUsers and add missing users 2023-06-12 21:01:57 -04:00
Jonathan Barrow
614c7d580d
nil check on connected users map when updating presence 2023-06-12 16:51:38 -04:00
Jonathan Barrow
4a98796b05
Added token padding bounds check and error response 2023-06-12 16:26:03 -04:00
Jonathan Barrow
2b66b5c21a
Compiles on latest library versions 2023-06-10 20:14:19 -04:00
Jonathan Barrow
a1e82c92d3
Updated env var names 2023-05-01 15:16:39 -04:00
Jonathan Barrow
108d5f387e
Import base nex-protocols-go to register DataHolders 2023-04-10 22:25:35 -04:00
Jonathan Barrow
2cce4a7af4
Updated to latest NEX libs 2023-04-08 10:44:51 -04:00