Signal identifiers, $eval(blah, -N), mode parsing - 02/06/04 04:14 PM
Just a few miscellaneous feature suggestions:
Before anyone points this out: I'm already aware that identifiers aren't necessary for signals, that negative evaluation can be achieved with gratuitous use of $!identifiers, and that the modes can be parsed using a script.
- The ability to provide identifiers for a signal event. Perhaps via a switch that takes a numeric parameter of the number of identifier->value pairs that are being given.
i.e.
/signal -i3 uop [color:red]nick starbucks_mafia chan #moo unick arnie regular-parameters[/color]
would give the signal event uop the predefined identifiers $nick, $chan, and $unick.
Edit: Now that I think about it the method I've suggested would mean that the identifier values couldn't contain spaces. This could be fixed by supporting double quotes, or it could simply be accepted as a limitation. Or someone could think of a better method for how to provide the identifiers than the one I've given, although I can't think of any other way it could be done that wouldn't be extremely messy. - Allow $eval() to take a negative value for the second parameter, $eval(blah, -2) -> $eval(blah, -1) -> $eval(blah, 0) -> blah (for those who think this can be done with $[color:red]!eval(blah, 0)[/color], it's not quite the same thing).
- An identifier for mode related events (specifically RAWMODE) that returns the sign, character, and parameter (if present) for each mode.
Right now the only thing resembling this is $mode(), which as far as I know only works with the few specific modes it has properties for (op, deop, owner, ban, etc.). What I'm suggesting is something like that, but which works with all modes and is generally more informative. Something like: $pmode(N) with the properties .sign returning + or -, .char returning the mode character, and .parm returning any parameter it has. It could even be extended so far as to take $pmode(<mode-character>, N).
Before anyone points this out: I'm already aware that identifiers aren't necessary for signals, that negative evaluation can be achieved with gratuitous use of $!identifiers, and that the modes can be parsed using a script.