mIRC Homepage
Posted By: maroon Suggestion for /ialmark - 01/03/23 12:51 PM
In addition to https://forums.mirc.com/ubbthreads.php/topics/271330/re-ial-me#Post271330 where having $ial($me) be persistent would allow setting ialmarks against yourself earlier and in more situations....

Ideas below are based on things I was encountering in trying to use ialmark for
https://forums.mirc.com/ubbthreads.php/topics/271388/re-nick-checker#Post271388

  • 1. The messages displayed by /ialmark are confusing to someone who's trying to understand how to use the command

    //ialmark $me foobar
    * Marked maroon 'default' 'foobar'

    suggested change:
    * Marked maroon 'default' as 'foobar'

    The message is often deceiving about what the command just did. The 2nd command of both pairs below shows a message as if it's *doing* something when it's not - it's simply displaying whether the label has a .mark attached to it or not, even though it shows the identical message.

    //ialmark -r $me
    * Unmarked maroon 'default'
    //ialmark $me
    * Unmarked maroon 'default'

    //ialmark $me foobar
    * Marked maroon 'default' 'foobar'
    //ialmark $me
    * Marked maroon 'default' 'foobar'

    Suggestion: These should not show the same message as if these are 2 ways of accomplishing the identical task. When first using ialmark, I'd see a message saying that the command was removing the named label, and then later I'd repeat the same command, and couldn't understand why the named label was not being removed there too. The messages would be more helpful if they were something like

    //ialmark -r $me
    * Removed maroon 'default'
    //ialmark $me
    * maroon 'default' is Unmarked

    //ialmark $me foobar
    * maroon 'default' Marked as 'foobar'
    //ialmark $me
    * maroon 'default' is 'foobar'
    .
  • 2. Syntax to remove the 'name' if the 'mark' parameter is blank. I was keeping a space-tokenized string attached to $me, and I was finding that

    .ialmark -n $me list %list

    ... behaved differently depending on whether the %list was blank or not. If %list was non-blank, it replaced the existing content of the named label, as expected. But if it was blank, it switches to the syntax for simply displaying the existing content of the named label - except because of using the silencing dot, it doesn't even do that.

    Suggestion: It looks like ialmark and $ialmark are not designed to have blank strings as the mark, as can be in hashtables, so it would be useful to have something like -nz behave as a conditional -rn if the there is no string being set due to a blank %var or $identifier return value. but otherwise would update/add the named label if there was a string to be set.

    //ialmark -nz $me list %list
    if (%list is non-blank) then is /ialmark -n $me list string-inside-variable
    if (%list is blank) then is /ialmark -rn $me list
    .
  • 3. Similar to how -wn allows deleting named labels that match a wildcard pattern, allow a -W that matches a wildcard pattern for the nick. If I want to remove the 'registered' named label from all nicks, it would be faster and more straightforward to be able to do "ialmark -Wnr * registered" instead of looping through the 2600 nicks in my $ial, and could remove all marks from all nicks like "ialmark -Wnrw * *". This should be backwards compatible since * and ? are not valid in nicks.
    .
  • 4. Since $ialmark syntax currently has parm1 being a nick, it could be backwards compatible to allow parm1 to be numeric N to find nicks having a specific named label attached to them.

    $ialmark(0,registered) = number of nicks having that named label
    $ialmark(1,registered) = 1st nick having that named label
    $ialmark(1,default).mark = for the 1st nick having a string attached to the default label, returns that .mark

    Unless there's some kind of behavior that should happen for $ialmark(1,1) (0,0) etc, they could return $null? Or is this getting too far into some kind of $ifind ...
© mIRC Discussion Forums