DNS Dialog

By Foamy on Jan 13, 2006

Place this into your remotes;

In the nicklist hit the "Dns" and you will get a dialog showing the information the DNS resolved; including the server the user is connected to.

dialog dnsinfo {
  title "Requested DNS Information"
  size -1 -1 151 74
  option dbu
  box "DNS Info", 1, 0 0 151 59
  edit %dns.nick, 2, 32 9 116 10, read autohs
  text "Nickname:", 3, 3 10 26 9
  text "IP:", 4, 3 22 22 9
  edit %dns.ip, 5, 32 21 116 10, read autohs
  text "Hostmask:", 6, 3 34 28 9
  edit %dns.hostmask, 7, 32 33 116 10, read autohs
  text "Resolved:", 8, 3 46 25 9
  button "Cancel / Dismiss", 11, 78 61 72 12, cancel
  button "OK / Copy IP to clipboard", 12, 1 61 76 12, default ok
  edit %dns.resolved, 13, 32 45 116 10, read autohs
}
alias displaydns {
  dialog -m DNSi $+ $rand(1,10) dnsinfo
}
alias dns {
  .dns $1-
}
alias -l cleanup {
  unset %dns.*
}

alias dns_begin {
  dns $$1
}

on *:DNS: {
  set %dns.nick $iif($nick,$nick,Nickname Not Specified)
  set %dns.ip $iif($iaddress,$iaddress,No IP resolved)
  set %dns.hostmask $iif($naddress,$naddress,No Hostmask Available)
  set %dns.resolved $iif($raddress,Yes!,Not Resolved)
  displaydns
  .halt
}

on *:DIALOG:DNSi*:SCLICK:*: { 
  if ($did == 12) { clipboard $did($dname,5) | cleanup }
  if ($did == 11) { cleanup }
}
menu nicklist {
  Dns:/dns_begin $$1
}

Comments

Sign in to comment.
TheWhistler   -  Oct 03, 2014
  • Error recursive call (line 21, dns.mrc)
    thats the error msg i get when i use the DNS cmd ??
    Dns:/dns_begin $$1
    .dns $1-

i had to take this out of the file to get it to work

alias dns {
.dns $1-
}

 Respond  
Flexi   -  Dec 10, 2007

Hi can i have a dns command?

 Respond  
ZabuzaMomochi   -  Dec 10, 2006

Very cool

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.