mIRC Home    About    Download    Register    News    Help

Print Thread
#18623 09/04/03 11:28 AM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Like if i type: /dns deep.serveirc.com it returns:
's ip address is 80.212.16.9

How to get it to return:
deep.serveirc.com ip address is 80.212.16.9


Code:

on *:dns: {
  if $iaddress == $null { 
    echo.grey Sorry, can't find $nick $+ 's ip address. (address is hidden)
    halt
  }
  if $nick == $null {
    echo.grey  [color:red]$what?[/color]  $+ 's ip address is $iaddress
  }
  else { 
    echo.grey $nick $+ 's ip address is $iaddress
  }
}

#18624 09/04/03 02:43 PM
Joined: Mar 2003
Posts: 31
G
GBX Offline
Ameglian cow
Offline
Ameglian cow
G
Joined: Mar 2003
Posts: 31
The $dns(N) identifier
This identifier can be used only in the on DNS event, and returns the address that was resolved and any associated IP addresses.

Properties: nick, addr, ip


$dns.addr is what you are looking for (not sure if it is necessary to specify the n parameter)

/help on dns
for more info

#18625 12/04/03 01:13 AM
Joined: Jan 2003
Posts: 96
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2003
Posts: 96
So you want it to display the DNS result like:

DNS FOR deep.serveirc.com it returns: IS 80.212.16.9

on *:dns: { if $iaddress == $null { echo.grey Sorry, can't find $nick $+ 's ip address. (address is hidden) halt }
if $nick == $null { echo.grey $what? $+ 's ip address is $iaddress } else { echo.grey $nick $+ 's ip address is $iaddress }}

on *:dns: {
var %dnsblah $2 (that will get the second word you type (You can also use $2- that will take all words from the second and onwards))
if ($iaddress == $null) { echo.grey Sorry, can't find %dnsblah $+ 's ip address. (address is hidden) }
else { echo.grey %dnsblah $+ 's IP is $iaddress }
}

That be of any help ?

#18626 12/04/03 09:06 AM
Joined: Mar 2003
Posts: 49
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
on *:DNS: {
echo -ta 
echo -ta  $+ %c1 $+ --->  $+ %c4 $+ DNS $+ %c1 search $iif($nick != $null, for $mule($nick))  $+ %c1 $+ <---
echo -ta  $+ %c1 $+ Resolve try on $+ %c4 $+  $naddress
if ($dns(0) == 0) { echo -at  $+ %c1 $+ Unable to resolve from $+ %c4 $+  $naddress }
else {
%i = 1
while (%i <= $dns(%i)) {
echo -ta  $+ %c4 $+  $+ %i $+ )  $+ %c1 $+ Resolved successfully $+ %c4 $+  $dns(%i).ip
inc %i
}
}
echo -ta  $+ %c1 $+ ---> End of  $+ %c4 $+ DNS $+ %c1 search ( $+ %c4 $+ $dns(0) $+   $+ %c1 $+ Resolved) <---
echo -ta 
halt
}

#18627 13/04/03 07:08 PM
Joined: Dec 2002
Posts: 29
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Dec 2002
Posts: 29
1) /dns localhost
---> DNS search for <---
Resolve try on
Unable to resolve from
---> End of DNS search ( Resolved) <---

How create this
---> DNS search for localhost <--
Resolve try on localhost
Unable to resolve localhost
---> End of DNS search ( Resolved) <---

2) On /dns amazonka
---> DNS search for <---
Resolve try on p5080E90D.dip0.t-ipconnect.de
1 while (%i <= p5080E90D.dip0.t-ipconnect.de) Resolved successfully 80.128.233.13 inc 1 while (%i <= p5080E90D.dip0.t-ipconnect.de (users with this host: amazonka, pero, clone3)
---> End of DNS search ( Resolved) <---


--
http://www.globirc.net
irc.globirc.net
#18628 21/04/03 09:28 PM
Joined: Jan 2003
Posts: 96
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2003
Posts: 96
How create this
---> DNS search for localhost <--
Resolve try on localhost
Unable to resolve localhost
---> End of DNS search ( Resolved) <---

How create this
---> DNS search for localhost <--
Resolve try on ( use $1 here )
Unable to resolve ( use $1 here )
---> End of DNS search ( Resolved) <---

Might need to set a var for $1 tho


Link Copied to Clipboard