Reposting separately since it wasn't addresses in the other thread when posted above your reply here https://forums.mirc.com/ubbthreads.php/topics/262113/Re:_$hotlink(match)#Post262113

$hotlink(match) behaves differently depending on which direction the mouse cursor is moving when it encounters the hotlink match. It doesn't find a nick in channel by reduce strings starting/ending with non-alphanumeric characters if it arrives from a direction where characters were removed.

Paste the code below in a remote script and run: /hotlinktest

This code uses the 1st nick of the 1st channel, but you can edit the 1st 2 lines to work with any channel/nick combo you wish, and the result is the same. It works best if you arrange your status window so you can see activity at the same time as your mouse is hovering over text within the channel window. The test lines have all 4 combos of the nick with/without non-alphanumerics touching it from left/right/both sides. I didn't obverve where it made a difference which non-alphanumeric was stripped.

$hotlink(match) reduces NICK_ to NICK if NICK_ is not also a nick in channel, but only if you approach it from the top/bottom or from the left-side where the Underscore was not stripped. If you approach it from the right where the Underscore was stripped off, $hotlink(match) is instead filled with the entire not-a-nick word.

Same thing happens if you approach _NICK from the left side where a non-alpanumeric was stripped.

If your mouse approaches -NICK- or +NICK+ or _NICK_ or =NICK= etc from either the left or the right side, $hotlink(match) doesn't find NICK within the string as it does when approaching it from the top/bottom, so it returns the entire string the same as $hotlink(word).

Code:
on *:hotlink:*:*:{
  if ($hotlink(match) != $hotlink(word)) echo 4 -sg $v1 $v2
  else echo 3 -sg $v1 $v2
  ; Note: without HALT, clicking on nick in chat message doesn't change $snick
  ; halt
}
alias hotlinktest {
  var %n $nick($chan(1),1)
  window -a $chan(1)
  var %i 255
  while (%i isnum 0-255) {
    if ($chr(%i) !isalnum) {
      echo -ag line spacer
      echo -ag %i $chr(%i) test %n test %n $+ $chr(%i) test $chr(%i) $+ %n test $chr(%i) $+ %n $+ $chr(%i) test
    }
    dec %i
  }
}