Normally when you look at an ini file through a text editor it looks something like
[section1]
item1=data1
item2=data2
item3=data3
[section2]
item1=data1
item2=data2
item3=data3
I'm trying to use an ini file to store some information for specific nicks, using the nick as the section.
For most nicks this isn't a problem, however, I recently noticed that a couple of the nicks have the [ ] characters in the nick, which is making it difficult to use the ini file format.
While I could use hash tables for this, I'm trying to reduce the number and size of the hash tables in use. This is being used on a bot, and currently the bot has 10 hash tables with between 20 and 10,000 entries (depending on the table).
The larger tables (ie: 5,000+ entries) could easily be transferred over to ini file format, as 99% of the information is just being stored.
Any suggestions as to how I could handle the [ ] characters in the respective nicks?