mIRC Home    About    Download    Register    News    Help

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

Re: join / IP address [Re: 7thHeaven] #193094 14/01/08 10:54 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
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?

Re: join / IP address [Re: LostShadow] #193099 14/01/08 11:56 PM
Joined: Nov 2007
Posts: 13
7
7thHeaven Offline OP
Pikka bird
OP Offline
Pikka bird
7
Joined: Nov 2007
Posts: 13
no, doesn't work :p

Re: join / IP address [Re: 7thHeaven] #193100 15/01/08 12:02 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
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"
Re: join / IP address [Re: 7thHeaven] #193104 15/01/08 02:38 AM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
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.

Re: join / IP address [Re: LostShadow] #193175 15/01/08 09:51 PM
Joined: Nov 2007
Posts: 13
7
7thHeaven Offline OP
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>

Re: join / IP address [Re: 7thHeaven] #193179 15/01/08 10:18 PM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
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.

Re: join / IP address [Re: 7thHeaven] #193226 16/01/08 08:25 PM
Joined: Jul 2006
Posts: 107
L
LonDart Offline
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
Re: join / IP address [Re: LonDart] #193228 16/01/08 10:47 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
on *:JOIN:#: //echo -a $address($nick,5)

?

Re: join / IP address [Re: LonDart] #193232 17/01/08 12:59 AM
Joined: Nov 2007
Posts: 13
7
7thHeaven Offline OP
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

Re: join / IP address [Re: 7thHeaven] #193234 17/01/08 01:40 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
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"
Re: join / IP address [Re: 7thHeaven] #193235 17/01/08 01:48 AM
Joined: Jul 2006
Posts: 107
L
LonDart Offline
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
Excellent logic. Wish I'd have thought of it grin


LonDart
Re: join / IP address [Re: argv0] #193243 17/01/08 05:53 AM
Joined: Nov 2007
Posts: 13
7
7thHeaven Offline OP
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