Judging by the OP's use of the filename "aliases.ini", I think he is looking to have this work on ini files and alias files. Your identifier seems to work with neither.

As a sidenote, the convention is to return $null if the index value is out of range or if there is any other error. "0" is a valid alias name, so it's ambiguous to return that in an error situation.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"