Jump to content

our config file parsing is...sort of a joke.


Ind

Recommended Posts


  • Group:  Members
  • Topic Count:  169
  • Topics Per Day:  0.04
  • Content Count:  1260
  • Reputation:   750
  • Joined:  11/19/11
  • Last Seen:  

we don't have one, not even two, but three "standard" (wat) config parsing subsystems:

  1. /common/strlib.c::config_switch stuff (with relatives all over the place within all 3 servers)
  2. libconfig (most awful code i've ever seen)
  3. /common/raconf.c

and thats what I'd like to discuss in this topic, please post all your opinions, my opinion:

drop all 3, write a new one with a input similar to libconfig one which is, imo, pretty good-looking and easy to read.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   101
  • Joined:  11/13/11
  • Last Seen:  

it's easy to write a lib like libconfig with flex+bison, but, if we can use it, why create another one?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  169
  • Topics Per Day:  0.04
  • Content Count:  1260
  • Reputation:   750
  • Joined:  11/19/11
  • Last Seen:  

yes that can also be a option

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   101
  • Joined:  11/13/11
  • Last Seen:  

But using libconfig it would be a total config files rewrite as it doesn't follow our current config syntax

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Would any of this change trunk/conf/help.txt ?

I'm about to edit some commands to use atcommand_help_string() and read their help text from /conf/help.txt instead of soft-coded messages in /conf/msg_athena.conf

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   101
  • Joined:  11/13/11
  • Last Seen:  

yep. it could be something like lua, one line per string in the array as libconfig can deal with arrays and groups.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  169
  • Topics Per Day:  0.04
  • Content Count:  1260
  • Reputation:   750
  • Joined:  11/19/11
  • Last Seen:  

do any of you know if we're allowed to modify libconfig? (there are a couple things in it that are quite annoying, for example if it finds a duplicate entry in the file it drops the whole file data rather than throwing a warning or replacing.)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  169
  • Topics Per Day:  0.04
  • Content Count:  1260
  • Reputation:   750
  • Joined:  11/19/11
  • Last Seen:  

Thank you :3 I'll grab my sword and start ripping stuff out of it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

Let's also consider how much compatiblity do we want to maintain with eA. The more config format we change, the more work we force to the users who wants to migrate to rA.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

For conversion support, perhaps a similar tool to convert configs like how forums do it i.e. smf->ipb. We had one for porting item_db.txt into `item_db`, so why not for the /conf files? It shouldn't be difficult to maintain - how often do new configs pop up in eA?

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...