Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
Doing what you propose would just add to the technical debt. 90% of what I'm doing is not adding command line parameters. Its adding a config system that suites what MCServer now is, as opposed to what it was when the current system was added. Once we have the infrastructure in place, then adding command line parameters will be trivial.
And that's before we get to the UX issues I described earlier. And the fact that if the system doesn't know something is overridden, we have no way of preventing changes in the webadmin.
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
Chaining iniFile's with the current interface is ridiculously complicated. I've had to rewrite FindKey three times, because I keep finding new edge ases which require storing new information about lookups.
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
GetNumValues is a challenge to implement.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
Can't we use unordered_map's? Simply read all the arguments in the main function, put them in an unordered map, and pass it to the cRoot (where the settings are normaly read). In there it first looks if the item is present in the unordered map, and if not it takes if from the settings.ini.
Of course, I have little C++ knowledge, so I could be talking nonsense.
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
That would work technically but has other issues with design. I'm trying to follow the SRP, and I'm not sure what cServers responsibility is, but working out overrides is not it. As its not its responsibility, adding this logic would cause more issues with adding other parameters in the future.
Posts: 52
Threads: 5
Joined: May 2015
Thanks: 6
Given 7 thank(s) in 4 post(s)
What's the current status on the IP stuff? I haven't emailed the host in a while and would like to give him an update on things.