/dns doesn't actually go through the IRC server, so you wouldn't be kicked off for that afaik..
The problem is, /dns sometimes takes a few seconds to go through. So the join messages would be delayed. Not only that, but you'd have to put the "join" message into the on *:dns:{ } event.
I went ahead and wrote a version of this. I'll explain a few things at the bottom of this post.
on ^*:join:*: {
set %joined. [ $+ [ $nick ] ] %joined. [ $+ [ $nick ] ] #
.dns $nick | haltdef
}
on *:DNS: {
if (%joined. [ $+ [ $dns(0).nick ] ]) {
var %chans = $v1 , %i = 1 , %nick = $dns(0).nick
var %addr = $iif($dns(0).addr,$v1,$address($nick,5))
var %ip = $iif($dns(0).ip,$v1,Not Found)
unset %joined. [ $+ [ $dns(0).nick ] ]
while ($gettok(%chans,%i,32)) {
var %curchan = $v1 | inc %i
echo -ti3c join %curchan *** %nick ( %addr ) ( %ip )
}
}
}
The reason you probably *shouldn't* use this is, it takes a few additional seconds to resolve IP addresses, thus, before the "on DNS" event can get the IP or Address, the person who joined the channel would be able to "talk" before the *** nick ( address ) ( ip ), echo would show up.
Hope that bit of information helps. Good luck.
Edit Note:
You could remove the haltdef in the "on join" event, and just leave the normal join messages there, and modify the "echo" to show that the IP resolved.
Of course, doing that would give you two seperate lines.