Hey,
When you pass item names with multiple words to $readini, the extra words are appended to the result:
//echo -a $readini(file, n, section, item)
value
//echo -a $readini(file, n, section, item extra stuff)
value extra stuff
The expected behaviour is to use "item" as the item name and not append " extra stuff" to the result.
I'm using version 7.14.
Thanks.
The current behaviour could well be considered a bug, I'm not sure I agree with your 'expected' behaviour though. I would expect it to return $null as there is no item "item extra stuff".
What starbucks_mafia said is more accurate. If you use "item extra sutff" as your item name, mIRC should search for the item named "item extra stuff" and return $null, not search for "item".
The lack of support for spaces in item names is an implementation limitation, not a design limitation. It is theoretically possible for an item name to contain spaces with proper escaping or quoting, it's just not implemented currently. Since there is no standard for ini files, there's no reason why mIRC can't extend support for item names with spaces in a future version. This functionality should be therefore reserved for future use, which means relying on searching just the first word would/could break things in an update.
Right. Using "item extra stuff" as the item name makes much more sense, even if /writeini doesn't support item names with spaces yet.
This is obviously a holdover from when $read and $readini didn't use parenthesis, which made it impossible for the item name to have spaces. For example:
set %blah $readini file.ini group item more things on this line
I'm willing to bet the original code for this function just appends the rest of the line to the output as it used to.