echo -a $chan(#).onjoin doesnt work

to get the topic i do $chan(#).topic

how do i get the onojin message?