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

Autodownloading configurations #75

Closed
tigerw opened this issue Aug 11, 2013 · 14 comments
Closed

Autodownloading configurations #75

tigerw opened this issue Aug 11, 2013 · 14 comments

Comments

@tigerw
Copy link
Member

tigerw commented Aug 11, 2013

Does anyone want MCS to automatically generate download it's configurations files like the vanilla server?

Currently, only a few options are automatically generated (a bit of Server, Gamemode, Authentication, and Rcon) and the code is scattered everywhere this will be a problem if the admin inadvertently deletes the included inis. Additionally, this will allow four file distributions (plugins, webadmin, server, readme), as well as increased resistance against errors produced by code not using example.inis (especially plugins).

Would it be good to put it all at the start, and does it go into root.cpp or something?

@bearbin
Copy link
Member

bearbin commented Aug 11, 2013

This would be good, something I've wanted for a while.

We could also perhaps get rid of the install folder 😄

@bearbin
Copy link
Member

bearbin commented Aug 11, 2013

Also, loads more comments showing all the options in the configs would be nice too 😃

@madmaxoft
Copy link
Member

I don't think that's such a great idea.
Which configuration options will be added and which won't? How will you decide? And what if the configuration options change in the future?

I think we're already good enough in this regard - for all the values the server has already the defaults that is uses; for the critical options it also writes those defaults into the INI file so that next time they're there, and the user may change them.

The world generator, on the other hand, doesn't write defaults into the INI, but produces clear warning messages to indicate what the admin needs to do to set them. I see this as a behavior preferable to silently writing a default into the file - what if the admin was trying to get something working, we'll just keep resetting his work back instead of giving him hints about what to do.

The config values should be primarily documented in the wiki, since there's not enough space (in the "reasonable format" limit) in the ini file to document everything. The ini files should already point to the wiki in their header comments.

@madmaxoft
Copy link
Member

Especially bad idea would be to centralize the options, because what does the cRoot know about what world generators have been compiled into the executable? Nothing. So it cannot set reasonable defaults. It makes sense to provide the defaults at the same place that defines their usage.

@tigerw
Copy link
Member Author

tigerw commented Aug 11, 2013

Alright, bearbin’s idea:

What about downloading the configs from github if the server can’t find them?

[Windows Mail App]

From: Mattes D
Sent: ‎Sunday‎, ‎11‎ ‎August‎ ‎2013 ‎12‎:‎49
To: mc-server/MCServer
Cc: Tiger Wang

Especially bad idea would be to centralize the options, because what does the cRoot know about what world generators have been compiled into the executable? Nothing. So it cannot set reasonable defaults. It makes sense to provide the defaults at the same place that defines their usage.


Reply to this email directly or view it on GitHub.

@bearbin
Copy link
Member

bearbin commented Aug 11, 2013

If it was to be pulled from online, it should probably also incorporate the Plugins folder, so you could have executable-only distributions 😃

@madmaxoft
Copy link
Member

We already have the ability to read *.example.ini file instead of every *.ini file we're reading, so distributing those example files should be enough.

To add to that, if you make it downloadable from the net, how will you tell which version will support what? What if the default will change to something only the newer versions support?

@bearbin
Copy link
Member

bearbin commented Aug 11, 2013

You could make it download only the files from the commit the build was compiled with. It should be possible, but IDK how.

@madmaxoft
Copy link
Member

And how often do you reckon those files will be modified? Hardly ever, because we're already spitting out builds like crazy.

@bearbin
Copy link
Member

bearbin commented Aug 11, 2013

so we should make it just download the latest version?

@tigerw
Copy link
Member Author

tigerw commented Aug 15, 2013

Updated description, shall I try?

@madmaxoft
Copy link
Member

I still fail to see any benefit, I see only problems. Also I fail to see any proper use-case. What's the point of downloading anything off the internet, when it is already included in the base distribution package?
We've ruled out updates - that's never gonna happen to old versions, so the content is static.

@tigerw
Copy link
Member Author

tigerw commented Aug 23, 2013

Okay then, I will make it so that the server uses example.ini, warns, and doesn't try to write half-formed settings.ini files if they aren't present.

@tigerw tigerw closed this as completed Aug 23, 2013
@madmaxoft
Copy link
Member

The server already uses example files if the ini files don't exist. This behavior is coded in ReadFile and is turned on by default, so you don't need to do anything for it.

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

No branches or pull requests

3 participants