mIRC Home    About    Download    Register    News    Help

Print Thread
#193091 14/01/08 10:09 PM
Joined: Nov 2007
Posts: 13
7
Pikka bird
OP Offline
Pikka bird
7
Joined: Nov 2007
Posts: 13
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=-

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
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?

Joined: Nov 2007
Posts: 13
7
Pikka bird
OP Offline
Pikka bird
7
Joined: Nov 2007
Posts: 13
no, doesn't work :p

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
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.

Joined: Nov 2007
Posts: 13
7
Pikka bird
OP Offline
Pikka bird
7
Joined: Nov 2007
Posts: 13
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>

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.

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.


LonDart
Joined: Apr 2007
Posts: 228
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
on *:JOIN:#: //echo -a $address($nick,5)

?

Joined: Nov 2007
Posts: 13
7
Pikka bird
OP Offline
Pikka bird
7
Joined: Nov 2007
Posts: 13
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

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
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


LonDart
argv0 #193243 17/01/08 05:53 AM
Joined: Nov 2007
Posts: 13
7
Pikka bird
OP Offline
Pikka bird
7
Joined: Nov 2007
Posts: 13
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