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
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
}
}
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
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 ?
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
}
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) <---
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