From WikiChip
Difference between revisions of "mirc/commands/dns"
< mirc‎ | commands

(Created page with "The '''/dns command''' resolves an address. If mIRC sees a "." in the name you specify it assumes it is an address and tries to resolve it. Otherwise it assumes it is a nickna...")
 
m (Add -mn switches and new syntax from v7.77)
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The '''/dns command''' resolves an address. If mIRC sees a "." in the name you specify it assumes it is an address and tries to resolve it. Otherwise it assumes it is a nickname and performs a [[/userhost command - mIRC|/userhost]] to find the user's address and then resolves it. If you specify an IP address, it looks up the host name. You can queue multiple /dns requests, and you can view the current queue by using /dns with no parameters.</p>
+
{{mirc title|/dns Command}}
 +
The '''/dns command''' resolves an address. If mIRC sees a "." in the name you specify it assumes it is an address and tries to resolve it. Otherwise it assumes it is a nickname and performs a {{mIRC|/userhost}} to find the user's address and then resolves it. If you specify an IP address, it looks up the host name. You can queue multiple /dns requests, and you can view the current queue by using /dns with no parameters.
  
 
== Synopsis ==
 
== Synopsis ==
/dns [-46ch] [nick|address]
+
/dns [-46chmn] [name server] [nick|address]
  
 
== Switches ==
 
== Switches ==
* '''-4''' - allows IPv4 results to be returned
+
* '''-4''' - allows IPv4 results to be returned (enforce ipv4 for status window which are in ipv6 mode)
* '''-6''' - allows IPv6 results to be returned
+
* '''-6''' - allows IPv6 results to be returned (enforce ipv6 for ipv4-only machine, note that you can't connect to it, not so useful)
 
* '''-c''' - clears all currently queued DNS requests, except for the one currently in progress
 
* '''-c''' - clears all currently queued DNS requests, except for the one currently in progress
 
* '''-h''' - forces /dns to treat the parameter as a hostname
 
* '''-h''' - forces /dns to treat the parameter as a hostname
 
+
* '''-m''' - requests A, AAAA, NS, MX, SOA, SRV, TXT records if available
 +
* '''-n''' - specify server name address
 
== Parameters ==
 
== Parameters ==
 
* '''[nick|address]''' - the nick or address you want to look up
 
* '''[nick|address]''' - the nick or address you want to look up
 
 
== Example ==
 
== Example ==
 
<syntaxhighlight lang="mIRC">;using default setting for ipv6
 
<syntaxhighlight lang="mIRC">;using default setting for ipv6
Line 21: Line 22:
 
/dns -6 Ouims
 
/dns -6 Ouims
 
;both
 
;both
/dns -46 Ouims</syntaxhighlight>
+
/dns -46 Ouims
 +
; beginning v7.58 returns all resolved IP addresses instead of only the 1st, such as for IRC network's round-robin name
 +
/dns chat.freenode.net</syntaxhighlight>
  
 
== Compatibility ==
 
== Compatibility ==
 
Added: 3.8
 
Added: 3.8
 
Added On: 25/11/95
 
 
<small>Note: Individual switches were not taken into consideration.</small>
 
 
 
== See also ==
 
== See also ==
* [[List of commands - mIRC|List of commands]]
+
* {{mIRC|$dns}}
* [[List of identifiers - mIRC|List of identifiers]]
 
* [[$dns identifier - mIRC|$dns]]
 
 
 
[[Category:mIRC commands]]
 

Latest revision as of 12:28, 8 November 2024

The /dns command resolves an address. If mIRC sees a "." in the name you specify it assumes it is an address and tries to resolve it. Otherwise it assumes it is a nickname and performs a /userhost to find the user's address and then resolves it. If you specify an IP address, it looks up the host name. You can queue multiple /dns requests, and you can view the current queue by using /dns with no parameters.

Synopsis[edit]

/dns [-46chmn] [name server] [nick|address]

Switches[edit]

  • -4 - allows IPv4 results to be returned (enforce ipv4 for status window which are in ipv6 mode)
  • -6 - allows IPv6 results to be returned (enforce ipv6 for ipv4-only machine, note that you can't connect to it, not so useful)
  • -c - clears all currently queued DNS requests, except for the one currently in progress
  • -h - forces /dns to treat the parameter as a hostname
  • -m - requests A, AAAA, NS, MX, SOA, SRV, TXT records if available
  • -n - specify server name address

Parameters[edit]

  • [nick|address] - the nick or address you want to look up

Example[edit]

;using default setting for ipv6
/dns Ouims
;specifically allowing for ipv4 results
/dns -4 Ouims
;specifically allowing for ipv6 results
/dns -6 Ouims
;both
/dns -46 Ouims
; beginning v7.58 returns all resolved IP addresses instead of only the 1st, such as for IRC network's round-robin name
/dns chat.freenode.net

Compatibility[edit]

Added: 3.8

See also[edit]