mIRC Home    About    Download    Register    News    Help

Print Thread
#105244 14/12/04 04:44 AM
Joined: Dec 2004
Posts: 7
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2004
Posts: 7
how can i test for ip's instead of nicknames? liek the ban list does. such as.....

Code:
if($nickip == 64.821.68.15)
{
/say Hi Jack!
}  

#105245 14/12/04 08:20 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
It's not always going to be an IP, but
$site returns this part nick!user@host.com when used in an event
  • if $site == 123.123.123.123 { ... }
    if $site == user34.comspeed.net { ... }

$wildsite returns the same but with *!*@host.com

#105246 14/12/04 08:52 AM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
If the IP is static then wouldnt the host always be the same?
Anyhow, to get a good accurate IP from the user you can use /DNS $$1/$nick. That can be annoying though if its associated with an On Join event and doesnt always work if the channel or server is busy.

on *:JOIN:*: { /dns $nick }
on *:DNS: {
if ($dns(0).ip == 00.000.00.000) { /say Hello Jack!!! }
}

#105247 14/12/04 08:54 AM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
again depends on the ircd some have hostmasking and a dns on the nick wouldnt result in anything but an error
Here I picked a random user from my room
Rio!SonixAdven@D1083E36.672B1139.7700951A.IP
* Unable to resolve D1083E36.672B1139.7700951A.IP

#105248 14/12/04 09:10 AM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
I see.... looks like I need to get around a bit more. wink


Link Copied to Clipboard