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
Issue3136 #3137
Conversation
994acbe
to
9c7dffa
Compare
@@ -371,7 +371,7 @@ static std::unique_ptr<cMemorySettingsRepository> ParseArguments(int argc, char | |||
// Parse the comand line args: | |||
TCLAP::CmdLine cmd("Cuberite"); | |||
TCLAP::ValueArg<int> slotsArg ("s", "max-players", "Maximum number of slots for the server to use, overrides setting in setting.ini", false, -1, "number", cmd); | |||
TCLAP::MultiArg<int> portsArg ("p", "port", "The port number the server should listen to", false, "port", cmd); | |||
TCLAP::MultiArg<int> portsArg ("p", "ports", "The port numbers the server should listen to", false, "port", cmd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably stay as --port
as its a MultiArg
- ie ./Cuberite --port 25565 --port 25566
, would need something added to the description to indicate it can be set multiple times.
@johnmccabe I fixed your comments. |
It certainly looks like it should work: the default is |
continue; | ||
if (returnpair.first == mainpair.first) | ||
{ | ||
found = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you can do the breakficiation here?
Any crash fix is a good fix. Merge while the sun still shines! 🌞 |
I recommend you look at the old code and try and draw some sense from it. I have absolutely no idea what it was trying to do. |
In any case, I responded to your comments. |
@LogicParrot Could you review the changes so as to see what went wrong here? In particular the old code, which I couldn't understand at all (I just replaced it as it seemed to make no sense). |
I did not review the code yet. This is what I know so far:
Only one of the worlds would be read (I do not recall which) and the other is completely ignored. |
@LogicParrot If it was simply doubled INI values being ignored, then the fix is rather simple and I can push it back in a few mins if you want. |
Sure. Please do not push it straight to master though. Let us review it, and let us try to understand what the old code does and see if the new code replicates the full functionality. |
This fixes the crash portion of #3136
I couldn't get the ports set on the command line to actually override those set in the ini file though, maybe someone else could give me a hand?