mIRC Home    About    Download    Register    News    Help

Print Thread
#40110 06/08/03 11:06 PM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
hi, here's another one:

when you make /dns you get result or IP or reversed host,
my question ist how can i store that result (ip) in some variable like %dns_ip and use it in my script ?

#40111 06/08/03 11:09 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
/help on dns


Code:
//if ( khaled isgod ) echo yes | else echo no
#40112 06/08/03 11:12 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
Code:
on *:DNS:{
set %dns $dns(1)
}

^example.


new username: tidy_trax
#40113 06/08/03 11:37 PM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
well it shows me only host, how about resolved ip ?

#40114 06/08/03 11:43 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Too hard to RTFM?


Code:
//if ( khaled isgod ) echo yes | else echo no
#40115 06/08/03 11:44 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
$dns(1).ip


new username: tidy_trax
#40116 06/08/03 11:58 PM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
great, thanx pheoinx

#40117 06/08/03 11:59 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
np smile


new username: tidy_trax
#40118 07/08/03 12:02 AM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
ooops, sorry, one more, now i added all that to custom display where %hdns gives me host and %dns returns me valid IP, BUT what when mirc cannot resolve ip or host, it leaves me empty lines and i want it to say like Unknown, any ideas ?

#40119 07/08/03 12:03 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
paste your script.


new username: tidy_trax
#40120 07/08/03 12:06 AM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
ON 1:DNS:{
.set %hdns $dns(1)
.set %dns $dns(1).ip
/echo -s    Nickname: $nick
/echo -s    Host: %hdns
/echo -s    IP: %dns
}

#40121 07/08/03 12:08 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
try this.
Code:
ON 1:DNS:{ 
.set %hdns $dns(1)
.set %dns $dns(1).ip
/echo -s    Nickname: $nick
/echo -s    Host: $replace(%hdns,$null,unknown) 
/echo -s    IP: $replace(%dns,$null,unknown) 
} 


new username: tidy_trax
#40122 07/08/03 12:11 AM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
no, still the same, empty lines on UN-resolved, but thanx for tryiing smile

#40123 07/08/03 12:14 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
ON 1:DNS:{
.set %hdns $iif($dns(1),$dns(1),unknown)
.set %dns $iif($dns(1).ip,$dns(1).ip,unknown)
echo -s Nickname: $nick
echo -s Host: %hdns
echo -s IP: %dns
}


new username: tidy_trax
#40124 07/08/03 12:18 AM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
woohhoo, great, it works perfectly, thanx very very much Pheonix you rox !!!!


Link Copied to Clipboard