Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pretendo Support #28

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open

Add Pretendo Support #28

wants to merge 44 commits into from

Conversation

Preloading
Copy link

@Preloading Preloading commented Apr 28, 2024

This is a pretty massive PR, that should (mostly) add Pretendo support. This should resolve #10 and it should resolve #23. I am so so so glad that this mostly done.

Some other modifications:

  • Updated NintendoClients to latest, but SQLAlchemy & Flask-SQLAlchemy are still outdated.
  • I probably broke the client, I tried to make it work, but it seemed to inconvenient to set it up, and after someone said it was deprecated, I decided not to test. I believe that it will probably be deprecated, as the web app is much more convenient and easier to use Edit: Decided to test and fixed everything broken with it. Works with nintendo only though.
  • Delete friend from the tables if it no longer has any discord accounts linked to it. (only on deletion from consoles page)
  • A new page which allows you to choose between creating a pretendo account, or nintendo account

Migration Steps

Since this is a pretty massive update, it does require some database changes. I created a handy migration SQL file. MAKE SURE TO BACKUP THE DATABASE BEFORE RUNNING THE FILE!!!, you can't easily revert this, so make sure you have a backup in case if something goes wrong. This should prepare the database for pretendo, but to get it to actually run the pretendo backend, you must use your sacrificial 3ds again, and redump the NEX keys, this time in pretendo mode (you can get into pretendo mode by using Nimbus) You will also need to modify your private.py and public.py according to template.private.py & public.py. You will also need to modify whatever you use to start the backend, to start it twice at the same time with the arguments:

python backend.py -n nintendo
python backend.py -n pretendo
or
python backend.py --network nintendo
python backend.py --network pretendo
whichever is most convenient for you. This should be enough for you to have both Pretendo & Nintendo running! If it's not for some reason, please either comment on this post, or message me on discord (@Preloading)

Oh also, I recommend you do a test of it first, as I do not have the ablility to add activities.write to my thing, so I have no clue whether discord.py works.

Image Gallery
Because I'm proud of doing this
image
image
image

VERY BIG NOTE
This isn't quite functional yet, due to a presumed bug in Pretendo, where NintendoClients hangs the script. I've gotten it to mostly work, to the point of testing for a short period, but it will hang if left running.

Also Jon, in issue #10, it was not as simple as swapping out the url D: (also thank you for the effort you put in pretendo team. Not only did you deal with my stupid questions, and fixing some sorta date time bug which made the code not work, and eventually the bug which prevents this from being finished, thank you for creating and hosting pretendo!)

@Preloading Preloading marked this pull request as ready for review April 29, 2024 00:50
@Preloading
Copy link
Author

Please wait for pretendo to fix the bug that hangs it before merging

This was referenced Apr 29, 2024
@Preloading
Copy link
Author

Preloading commented May 3, 2024

Solves #29 aswell i guess

Copy link

@spotlightishere spotlightishere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations on adding support - this was a big undertaking! Looking forward to seeing this merged once the delay is resolved on Pretendo’s side.

Ultimately Delta has the final say here, but I had a few stylistic comments that may help them to review later on.

server/sqlite/CREATE.sql Outdated Show resolved Hide resolved
server/sqlite/CREATE.sql Outdated Show resolved Hide resolved
server/sqlite/CREATE.sql Outdated Show resolved Hide resolved
server/backend.py Outdated Show resolved Hide resolved
server/discord.py Outdated Show resolved Hide resolved
server/server.py Outdated Show resolved Hide resolved
@Preloading
Copy link
Author

Please wait for pretendo to fix the bug that hangs it before merging

It seems to be functioning after adding a horrifying fix, to make NintendoClients send ACK after 3170 years. This isn't permanent, but it should be fine till Pretendo fixes the bug that breaks this the code without this hack. So I'm gonna say, unless I find any other app-breaking issues, it should be fine to merge! (finally!)

@Preloading
Copy link
Author

Preloading commented May 12, 2024

never... mind... it's hanging again

nooooooooooooooooo!

Edit 1: My hack is working again???? wha????

@DanNguyenN
Copy link

DanNguyenN commented May 18, 2024

Hope this PR getting reviewed. Nintendo network is shut down.
Have you think about making a fork of this and create your own server?

@gllxflr
Copy link

gllxflr commented May 22, 2024

@MCMi460 please merge, most people won't be on Nintendo server because no online games work with it

@Preloading
Copy link
Author

It looks like the bug that has been breaking this has been fixed, but Pretendo seems to be having some server issues still that affect this a bit, but shouldn't impact usage of this that much

@DFBR1208
Copy link

Soooo, any idea of when will this be merged?

@spotlightishere
Copy link

spotlightishere commented Jun 12, 2024

Soooo, any idea of when will this be merged?

In general, it's not polite to ask for an exact date - open source maintainers have their lives to handle, on top of the work of maintaining and developing projects :)

However, within the NSO-RPC Discord server, @MCMi460 stated they would like to begin reviewing this within the coming weeks.

@DFBR1208
Copy link

Soooo, any idea of when will this be merged?

In general, it's not polite to ask for an exact date - open source maintainers have their lives to handle, on top of the work of maintaining and developing projects :)

However, within the NSO-RPC Discord server, @MCMi460 stated they would like to begin reviewing this within the coming weeks.

Sorry if it sounded rude, just wanted to know about any update on the project so far, thx for replying!!

Copy link

@spotlightishere spotlightishere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request] Add Pretendo support Initial support for Third-Party Nintendo Network servers : Pretendo
6 participants