mIRC Home    About    Download    Register    News    Help

Print Thread
#193091 14/01/08 10:09 PM
7
7thHeaven
7thHeaven
7
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=-

#193094 14/01/08 10:54 PM
L
LostShadow
LostShadow
L
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?

#193099 14/01/08 11:56 PM
7
7thHeaven
7thHeaven
7
no, doesn't work :p

#193100 15/01/08 12:02 AM
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
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.

#193104 15/01/08 02:38 AM
L
LostShadow
LostShadow
L
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.

#193175 15/01/08 09:51 PM
7
7thHeaven
7thHeaven
7
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>

#193179 15/01/08 10:18 PM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
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.

#193226 16/01/08 08:25 PM
Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
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.

M
Mpot
Mpot
M
on *:JOIN:#: //echo -a $address($nick,5)

?

7
7thHeaven
7thHeaven
7
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

#193234 17/01/08 01:40 AM
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
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

#193235 17/01/08 01:48 AM
Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
Excellent logic. Wish I'd have thought of it grin

argv0 #193243 17/01/08 05:53 AM
7
7thHeaven
7thHeaven
7
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



Link Copied to Clipboard