mIRC Home    About    Download    Register    News    Help

Print Thread
#25916 25/05/03 01:06 PM
Joined: May 2003
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: May 2003
Posts: 2
I ran a search but couldn't find a question that seemed to coincide with mine, so..

How do you go about getting the IP of $nick in a script? I have a script that logs people's nicks when they break the rules of
my channel. I was wondering if there was a way to get it to
add their IPs to the log.

I tried adding ( $ip ) into it, but then when I opened the file it's saving all the trespasses to it seemed weird how much
every IP resembled that of my firewall. laugh


Anyways, thanx in advance for any help.
Daniel.

#25917 25/05/03 01:09 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
/help $ip
$ip
Returns your IP address.

You have to /DNS user & wait response from it with on dns event, to get IP, why don't you just log their host names?


Code:
//if ( khaled isgod ) echo yes | else echo no
#25918 25/05/03 01:35 PM
Joined: May 2003
Posts: 11
R
Pikka bird
Offline
Pikka bird
R
Joined: May 2003
Posts: 11
$address(nickname,type)
Searches the Internal Address List for the address associated with the specified nickname.

$address(nick,1) returns *!*user@host

If the Internal Address List doesn't contain a matching nickname, the identifier returns $null.

See $mask() for a list of types.


The internal Address list is updated when you or any user joins a channel, so all you have to do is check $address and use a $gettok to seperate the host or ip from the nickname and ident

#25919 25/05/03 01:42 PM
Joined: May 2003
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: May 2003
Posts: 2
I used $address( $nick , 0) and that does exactly what I need. laugh

Thanks alot, man!

#25920 25/05/03 03:58 PM
Joined: May 2003
Posts: 11
R
Pikka bird
Offline
Pikka bird
R
Joined: May 2003
Posts: 11
np wink

#25921 26/05/03 02:28 AM
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
You could also use $wildsite


--------
mIRC - fun for all the family (except grandma and grandpa)
#25922 26/05/03 02:44 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
$wildsite, however, works only within remote events.

#25923 26/05/03 09:18 AM
Joined: Dec 2002
Posts: 339
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
shouldn't you dns to get the ip is the user is logged into the network with an ip?
$address $wildsite and everything will get ya the address he uses now... not his ip if he has his host...?


Link Copied to Clipboard