Within an ON:EVENT: handler, the $$identifier behavior has been to mimic /return instead of /halt. It doesn't halt another event handler in a different script from being seen, doesn't halt the message or input from being processed, and it doesn't trigger the & prefix of another handler as if the event had been halted.

However I'm not seeing consistent behavior for $$local_identifier, even where $chan is defined.

In ON:TEXT, $$chan triggers the /return behavior due to being $$null even within a #channel, unless you remove the semi-colon from the 'alias chan', in which case the not-null allows the :TEXT: handler to continue.

In ON:INPUT, $$chan triggers the identifier warning unless you enable 'alias chan'

Triggering the bug involves doing any of the following 3, before/after removing the semicolons from within double_dollar_test or from 'alias chan'.

1. correct behavior from: //double_dollar_test | echo -a success while test2 and test5 are commented

2. incorrect behavior from typing anything in any editbox, within :INPUT: $$chan generates identifier warning

3. incorrect /return due to $$chan being seen as $null within :TEXT:, even within a #channel when the message is seen: test <anything>. I would expect the /return from $$chan only outside #channel, such as in /query window or in status window.

Code:
ON *:INPUT:*:     { double_dollar_test }
ON *:TEXT:test*:*:{ double_dollar_test }

alias double_dollar_test {
  echo -g $target test1 $event $script
  ;echo -g $target test2 $$left(foo,0)
  echo -g $target test3 $chan / $chan
  echo -g $target test4 $chan / $$chan
  ;echo -g $target nick5 $nick / $$nick
  echo -g $target test6 $event
}

;alias chan { echo -a fake alias to prevent $ $+ $ $+ chan identifier warning within :input: $scriptline | return fakechan }