Author Topic: [SUGGESTION] /readconf and /writeconf  (Read 1061 times)

0 Members and 1 Guest are viewing this topic.

Offline DeMo

  • Soldier
  • **
  • Posts: 127
  • Stay Metal! \m/
    • Encoder 2002
[SUGGESTION] /readconf and /writeconf
« on: April 02, 2007, 02:16:07 pm »
I don't know if this topic belongs here or in the Server Discussion forum, so please move it to where you find more appropriate.

This is a suggestion for the Dedicated Server.
Ok, so I have a server but the hosting company doesn't offer FTP/SSH/SCP access to my account.
This means that everytime I wanna change the config file (soldat.ini) or send a new config I have to first send the file to them and they'll put it in the server folder.

My suggestion are commands to read and write directly from the config files.
/readconf [configfile] option
/writeconf [configfile] option value

configfile would be an optional parameter, if ommited the server would read info from the default file (soldat.ini).

Example: I wanna know if the option to register my server in ASE is activated in the default config.
/readconf ASE_Register
Server response: ASE_Register=1 in soldat.ini

Example: I wanna change the number of spectators to 3 in my clanwar.ini file.
/writeconf clanwar.ini Max_Spectators 3
Server response: Max_Spectators changed to 3 in clanwar.ini

Yes, I know we can use ARSSE/ESA to change a lot of stuff, but the problem is that these changes are not permanent. If you server crash and restart it will re-read the values from soldat.ini and overwrite any changes you made while the it was online. In my suggestion the /writeconf command would rewrite the value of the given option in the configuration file. This would give admins the possibility to change the configuration without having to upload the files everytime.

<@Evil-Ville> Expect a picture of Chakra` holding his fleshlight soon!

Offline User No. 2

  • Major
  • *
  • Posts: 81
  • IT engineer
Re: [SUGGESTION] /readconf and /writeconf
« Reply #1 on: April 09, 2007, 02:49:59 am »
Possibility to read (and write) config variables (for remote admins) would be really usefull feature. For example often soldat dedicated servers has several remote admins, but only server owner has access with FTP to server (config) files. Possibility to read (and write) from soldat client and remote admin console would eliminate this restriction effects, and would make remote admins enable to check or set all server settings.
Regards, User No. 2

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: [SUGGESTION] /readconf and /writeconf
« Reply #2 on: April 10, 2007, 07:08:31 am »
Just code this using the server-scripting and get them to upload it to your server.

Offline Zamorak

  • Camper
  • ***
  • Posts: 475
Re: [SUGGESTION] /readconf and /writeconf
« Reply #3 on: April 10, 2007, 07:40:57 am »
Possibility to read (and write) config variables (for remote admins) would be really usefull feature. For example often soldat dedicated servers has several remote admins, but only server owner has access with FTP to server (config) files. Possibility to read (and write) from soldat client and remote admin console would eliminate this restriction effects, and would make remote admins enable to check or set all server settings.

For most people, remote admins aren't granted shell access for that exact reason. To overmind this would take the point out of having remote admins. This requires more trust.

Add a password to this command, and then it's ok.

And since it's possible with EnEsCe's scripting, there is no need for an official command.
ZamoraK |2Wai|

Offline DeMo

  • Soldier
  • **
  • Posts: 127
  • Stay Metal! \m/
    • Encoder 2002
Re: [SUGGESTION] /readconf and /writeconf
« Reply #4 on: April 14, 2007, 02:53:11 pm »
Just code this using the server-scripting and get them to upload it to your server.
Lol good idea, damn I'm stupid. :P

Edit: well.. I tried to script it but there's a big problem: there is no WriteINI function.
The command to read settings is working with the ReadINI function, but without one to write to INI's I can't script the other part. :(

Edit 2: ok so I talked to EnEsCe and there isn't going to be a WriteINI function.
So the only way around this is to read the whole file, search for the value to be change and rewrite the whole file back to disk. I'm working on it now, when it's finished I'll post it in the scripting area.
« Last Edit: April 15, 2007, 06:09:49 pm by DeMo »

<@Evil-Ville> Expect a picture of Chakra` holding his fleshlight soon!