Thanx very much! I had to change it a little, to get everything on one line.

But this works...

on *:JOIN:#chanX: {
%x = $address
dns $nick
}

on *:DNS:msg #chanY 14* Joins: $nick ( $+ %x $+ ) ip: $dns(0).ip