I had suggested an $isflag() or $isswitch() function before, which was shot down on the same grounds of complexity. I personally felt it worked much like the $ini() and $readini() functions, but for enumerating and extracting switches and any corrisponding values.
The greatest difficulty with handling switches is tracking the switch polarity, such as with [color:660000]-oo+oo[/color]. I'm certain that Khaled has already written such a function that breaks down MODE flags and /command switches, internally. All he should really need to do is bind it to an $identifier for us (in theory).
- Raccoon