mIRC Homepage
Posted By: 7thHeaven join / IP address - 14/01/08 10:09 PM
Hi,

I want to see the IP number of people who join a channel... in another channel. Let's assume chanX and chanY.

I've tried:

on *:JOIN:#chanX: /msg #chanY 14* Joins: $nick ( $+ $address $+ ) $dns (or $iaddress)

but that doesn't work...

What am I doing wrong?

Greetings, -=7th Heaven=-
Posted By: LostShadow Re: join / IP address - 14/01/08 10:54 PM
Originally Posted By: 7thHeaven
Hi,

I want to see the IP number of people who join a channel... in another channel. Let's assume chanX and chanY.

I've tried:

on *:JOIN:#chanX: /msg #chanY 14* Joins: $nick ( $+ $address $+ ) $dns (or $iaddress)

but that doesn't work...

What am I doing wrong?

Greetings, -=7th Heaven=-


It probably does work.

It probably does:

<7thHeaven> 14* Joins: Nick ( ) (or

Am I right?
Posted By: 7thHeaven Re: join / IP address - 14/01/08 11:56 PM
no, doesn't work :p
Posted By: argv0 Re: join / IP address - 15/01/08 12:02 AM
Try http://www.kthx.net/ftb/#52

PS. "doesn't work" is the most unhelpful 2 (and a half) words in the english language. Try being more specific.
Posted By: LostShadow Re: join / IP address - 15/01/08 02:38 AM
Or in other words, you have something like.

on *:JOIN:#chanX: something something.
on *:JOIN:#chanX: something else.

Only the 1st line will work. The 2nd on join will not. The 2nd 1 will have to be cut and paste into a new page. So in Alt R, do File, New, then paste.

-Neal.
Posted By: 7thHeaven Re: join / IP address - 15/01/08 09:51 PM
to be correct:

on *:JOIN:#chanX: /msg #chanY 14* Joins: $nick ( $+ $address $+ ))

works... giving loginname, address etc.

But I want the IP nummer behind it... the number you'll get when doing a /dns <nickname>
Posted By: Bekar Re: join / IP address - 15/01/08 10:18 PM
As the /dns command returns it's results in an event, you can't do it with the built-in commands.

There are any number of DLL's available that will do this inline for you if you desparetly need one. Check the scripting sites for them.

That being said, does anybody know if you can do this with a $com() call? I don't know enough about COM stuff to answer that.
Posted By: LonDart Re: join / IP address - 16/01/08 08:25 PM
If you'd rather not use a dll, this ought to do what you want.
Code:
on *:JOIN:#chanX: {
  msg #chanY 14* Joins: $nick ( $+ $address $+ )
  dns $nick
}

on *:DNS:msg #chanY $dns(0).nick $+ 's ip: $dns(0).ip

If it comes back blank, it failed to resolve.
Posted By: Mpot Re: join / IP address - 16/01/08 10:47 PM
on *:JOIN:#: //echo -a $address($nick,5)

?
Posted By: 7thHeaven Re: join / IP address - 17/01/08 12:59 AM
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
Posted By: argv0 Re: join / IP address - 17/01/08 01:40 AM
with your code you will be echoing joins every time you dns someone/something by the way. Try it-- /dns yahoo.com

you might want to set some variable so that it only executes that ON DNS event when it follows an ON JOIN event for that specific nickname
Posted By: LonDart Re: join / IP address - 17/01/08 01:48 AM
Excellent logic. Wish I'd have thought of it grin
Posted By: 7thHeaven Re: join / IP address - 17/01/08 05:53 AM
Arg: well, it's for the sake of logging... I rarely do a /dns myself.
I'm on some channels with 50+ people, always handy to know the IP numbers smile

Many thanks, specically to LonDart (but also everyone else)... guiding me into the right direction.

Next step: creating a file with every IP / nick in it... so when a user is connecting... you also see the last 5 nicks used.

Greetings, Rob

© mIRC Discussion Forums