You can't use $nick or $chan etc. in a socket event, because those identifiers aren't filled.
He needs to either sockmark his socket like:
sockmark <socket> <nick or channel>
and in the sockopen event, he can then do: msg $sock($sockname).mark <message>
Or he could of course just set some variables before initiating the socket, like %chan or %nick or whatever, and then reference these in the sockopen event.