$+() is a concatenator: A $+ B can also be written as $+(A,B)
$(A,N) evaluates its argument(A) N times.
So
$( $+(%,channel.,$chan) , 2)
evaluates $+(%,channel.,$chan) 2 times, as follows:
0: $+(%,channel.,$chan)
1: %channel.#chan
2: *!*@host
so if I tried this as
on *:text:hello:#imagica: {
msg $chan $( $+(%,channel.,$chan) , 2)
}
this would return $null,
thus unable to send the empty message to the channel.
Because that's what it did when I tried it