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 a generic "JoinServer" function #693

Merged
merged 18 commits into from
Jul 29, 2024
Merged

Conversation

Klemmbaustein
Copy link
Contributor

Adds a function that allows the client to join a server from a ServerInfo struct.
This also changes the server browser to use this function. I have not tested if joining a server with a password works, but it should.

As an example, this is how you'd join a specific server by name:

// Go through all servers that are currently online
foreach ( s in NSGetGameServers() )
{
	// Join the server if it's stupid gun game
	if ( s.name == "Neinguars Stupid Gun Game" )
	{
		JoinServer( s )
		break
	}
}

@GeckoEidechse
Copy link
Member

This builds on top of #688, right?
(just so that I have my PRs in the right order when I finally look at them ^^)

@Klemmbaustein
Copy link
Contributor Author

This builds on top of #688, right? (just so that I have my PRs in the right order when I finally look at them ^^)

it does

@ASpoonPlaysGames ASpoonPlaysGames added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Sep 2, 2023
Copy link
Contributor

@ASpoonPlaysGames ASpoonPlaysGames left a comment

Choose a reason for hiding this comment

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

some formatting and optimisations

Klemmbaustein and others added 3 commits September 2, 2023 18:00
Co-authored-by: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com>
Co-authored-by: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com>
Co-authored-by: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com>
@Klemmbaustein
Copy link
Contributor Author

Klemmbaustein commented Sep 2, 2023

some formatting and optimisations

ty. most of the code with the bad formatting was code i took from elsewhere in the file. printing the server password really is a bad idea though. i don't know why i did that

Klemmbaustein and others added 3 commits September 2, 2023 18:26
….nut

Co-authored-by: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com>
….nut

Co-authored-by: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com>
Co-authored-by: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com>
Copy link
Contributor

@ASpoonPlaysGames ASpoonPlaysGames left a comment

Choose a reason for hiding this comment

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

Code looks good now :)

@ASpoonPlaysGames ASpoonPlaysGames removed the needs code review Changes from PR still need to be reviewed in code label Oct 1, 2023
@github-actions github-actions bot added the merge conflicts Blocked by merge conflicts, waiting on the author to resolve label Jan 8, 2024
@GeckoEidechse
Copy link
Member

Merge conflicts atm

Copy link
Member

@catornot catornot left a comment

Choose a reason for hiding this comment

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

Worked!
test by using the function in compartya

altought perhaps there should be a JoinServerByName added in a later pr so that it would be easier to call from plugins :)

@Zanieon Zanieon added waiting on changes by author Waiting on PR author to implement the suggested changes and removed needs testing Changes from the PR still need to be tested labels Mar 29, 2024
@GeckoEidechse
Copy link
Member

Thanks for testing @catornot

@Klemmbaustein can you resolve merge conflicts so that we can consider merging? ^^

@GeckoEidechse GeckoEidechse changed the title added a generic "JoinServer" function Add a generic "JoinServer" function Mar 29, 2024
@catornot catornot removed merge conflicts Blocked by merge conflicts, waiting on the author to resolve waiting on changes by author Waiting on PR author to implement the suggested changes labels Mar 29, 2024
Copy link
Contributor

@Zanieon Zanieon left a comment

Choose a reason for hiding this comment

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

Code looks good as well so good to go!

@Zanieon Zanieon added the READY TO MERGE This mergeable right now label Mar 30, 2024
@GeckoEidechse
Copy link
Member

Aight this is basically ready to merge. Will be in v1.27.0. The only reason I'm pressing the merge button rn is cause I have a few more fixes lined up and backporting stuff from main to release branches over longer periods of time is pain :c

@GeckoEidechse GeckoEidechse merged commit e4b3cc7 into R2Northstar:main Jul 29, 2024
3 checks passed
GeckoEidechse added a commit that referenced this pull request Jul 31, 2024
GeckoEidechse added a commit that referenced this pull request Jul 31, 2024
Revert "Add a generic "JoinServer" function (#693)" as it causes issues with MAD due to duplicated server join logic as discussed on Discord

This reverts commit e4b3cc7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
READY TO MERGE This mergeable right now
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants