mIRC Home    About    Download    Register    News    Help

Print Thread
#133302 18/10/05 08:43 PM
Joined: Jun 2004
Posts: 133
S
state Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
Hi, forgive my english. id like to be able to echo myself with someones ip onjoin. then log there nick.

say. nick joins # as kevin

then if they change there name it be

nick was previously $othernick. any help?

#133303 19/10/05 01:46 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Umn, to get the users IP, you'd have to /dns them, unless of course their address/hostmask is their IP.

DNS'ing each person that joins could be a bit messy. =/

#133304 19/10/05 01:54 AM
Joined: Sep 2005
Posts: 73
D
Babel fish
Offline
Babel fish
D
Joined: Sep 2005
Posts: 73
I wouldn't recommend it to be honest. For a channel with lots of join events, it is likely you would be killed off the server for flooding it.

#133305 19/10/05 08:51 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Maybe this is what you want:
Go to Options (alt-o) -> IRC->Options -> Show: User Addresses
You can also check Short joins/parts. From then on, you always see the complete [email]ident@address[/email] for everyone joining/parting/quitting/... This will also be written in the log files.

If you really need their ip address, it's a lot more difficult and there's no guarantee the address to lookup is a real one. Many servers have some ip hiding mechanism, either through nickserv/X/Q or just by hashing part or all of the address...

Apparently /dns <nick> only does a USERHOST if the address isn't known, so for on join events that isn't needed. So, flooding yourself off the server is less of a problem, but getting accurate ip's is.

#133306 19/10/05 08:52 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
/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.

Code:
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.

Last edited by Rand; 19/10/05 08:57 AM.
#133307 19/10/05 08:21 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
Also Known As by tye @ hawkee.com


I refuse to engage in a battle of wits with an unarmed person. wink

Link Copied to Clipboard