Dialog Whois

By Foamy on Nov 19, 2005

this is a dialoged whois. so instead of it echoing somewhere, it pops up in a quite large dialog.

dialog -l nickinfo {
  title Whois
  size -1 -1 243 133
  option dbu
  box    "Whois",    001,   0   0 243 120
  text   "Nick:",        101,   3  10  29  10, left
  edit   "n/a",          102,  32   8 176  10, read autohs
  text   "Hostmask:",    103,   3  20  29  10, left
  edit   "n/a",          104,  32  18 176  10, read autohs
  text   "IP:",          105,   3  30  29  10, left
  edit   "n/a",          106,  32  28 176  10, read autohs
  text   "Alias:",       107,   3  40  29  10, left
  edit   "n/a",          108,  32  38 176  10, read autohs
  text   "Channels:",    109,   3  50  29  10, left
  edit   "n/a",          110,  32  48 176  10, read autohs
  text   "Server:",      111,   3  60  29  10, left
  edit   "n/a",          112,  32  58 176  10, read autohs
  text   "Server info:", 113,   3  70  29  10, left
  edit   "n/a",          114,  32  68 176  10, read autohs
  text   "Idle time:",   115,   3  80  29  10, left
  edit   "none",         116,  32  78 176  10, read autohs
  text   "Time on:", 117,   3  90  29  10, left
  edit   "n/a",          118,  32  88 176  10, read autohs
  text   "Reg'd nick:",  119,   3 100  29  10, left
  edit   "no",           120,  32  98 176  10, read autohs
  text   "IRC OP:",      121,   3 110  29  10, left
  edit   "no",           122,  32 108 176  10, read autohs
  button "Close",        999,   1 122 241  10, cancel
}

on *:DIALOG:nickinfo.*:INIT:*: {
  did -t $dname 999
  var %nickinfo.who = $gettok($dname,2,46)
  if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .nick ]) {
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .nick ]) { did -o $dname 102 1 %nickinfo. [  $+ [ %nickinfo.who ] $+ .nick ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .host ]) { did -o $dname 104 1 %nickinfo. [  $+ [ %nickinfo.who ] $+ .host ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .alias ]) { did -o $dname 106 1 %nickinfo. [  $+ [ %nickinfo.who ] $+ .ip ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .alias ]) { did -o $dname 108 1 %nickinfo. [  $+ [ %nickinfo.who ] $+ .alias ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .channels ]) { did -o $dname 110 1 %nickinfo.  [ $+ [ %nickinfo.who ] $+ .channels ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .srv ]) { did -o $dname 112 1 %nickinfo. [ $+  [ %nickinfo.who ] $+ .srv ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .srvinfo ]) { did -o $dname 114 1 %nickinfo.  [ $+ [ %nickinfo.who ] $+ .srvinfo ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .idle ]) { did -o $dname 116 1 %nickinfo. [  $+ [ %nickinfo.who ] $+ .idle ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .signon ]) { did -o $dname 118 1 %nickinfo. [  $+ [ %nickinfo.who ] $+ .signon ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .reged ]) { did -o $dname 120 1 %nickinfo. [  $+ [ %nickinfo.who ] $+ .reged ] }
    if (%nickinfo. [ $+ [ %nickinfo.who ] $+ .ircop ]) { did -o $dname 122 1 %nickinfo. [  $+ [ %nickinfo.who ] $+ .ircop ] }
    unset %nickinfo. [ $+ [ %nickinfo.who ] $+ .* ] 
  }
}

on *:DIALOG:nickinfo.*:SCLICK:*: {
  if (($did > 200) && ($did < 224)) { clipboard $did($calc($did - 100)) }
}

alias -l nickinfo {
  .whois $$1
  .dns $$1
  set %nickinfo. [ $+ [ $$1 ] $+ .nick ] $$1
  set %nickinfo. [ $+ [ $$1 ] $+ .count ] 0
}

alias -l nickinfo.dialog.open {
  if ($dialog(nickinfo. $+ $1)) { dialog -o nickinfo. $+ $1 }
  else { dialog -m nickinfo. $+ $1 nickinfo }
}

raw 311:*: {
  if (%nickinfo. [ $+ [ $2 ] $+ .nick ] == $2) {
    set %nickinfo. [ $+ [ $2 ] $+ .alias ] $6-
    haltdef
  }
}
raw 319:*: {
  if (%nickinfo. [ $+ [ $2 ] $+ .nick ] == $2) {
    set %nickinfo. [ $+ [ $2 ] $+ .channels ] $3-
    haltdef
  }
}
raw 312:*: {
  if (%nickinfo. [ $+ [ $2 ] $+ .nick ] == $2) {
    set %nickinfo. [ $+ [ $2 ] $+ .srv ] $3
    set %nickinfo. [ $+ [ $2 ] $+ .srvinfo ] $4-
    haltdef
  }
}
raw 307:*: {
  if (%nickinfo. [ $+ [ $2 ] $+ .nick ] == $2) {
    set %nickinfo. [ $+ [ $2 ] $+ .reged ] Yes!
    haltdef
  }
}
raw 317:*: {
  if (%nickinfo. [ $+ [ $2 ] $+ .nick ] == $2) {
    set %nickinfo. [ $+ [ $2 ] $+ .idle ] $duration($3)
    set %nickinfo. [ $+ [ $2 ] $+ .signon ] $asctime($4)
    haltdef
  }
}
raw 313:*: {
  if (%nickinfo. [ $+ [ $2 ] $+ .nick ] == $2) {
    set %nickinfo. [ $+ [ $2 ] $+ .ircop ] Yes!
    haltdef
  }
}
raw 318:*: {
  if (%nickinfo. [ $+ [ $2 ] $+ .nick ] == $2) {
    inc %nickinfo. [ $+ [ $2 ] $+ .count ]
    if (%nickinfo. [ $+ [ $2 ] $+ .count ] == 2) {
      nickinfo.dialog.open $2
    }
    haltdef
  }
}

on *:DNS: {
  if (%nickinfo. [ $+ [ $nick ] $+ .nick ] == $nick) {
    set %nickinfo. [ $+ [ $nick ] $+ .ip ] $iif($iaddress,$iaddress,no ip resolved)
    set %nickinfo. [ $+ [ $nick ] $+ .host ] $iif($naddress,$naddress,no hostmask  available)
    inc %nickinfo. [ $+ [ $nick ] $+ .count ]
    if (%nickinfo. [ $+ [ $nick ] $+ .count ] == 2) {
      nickinfo.dialog.open $nick
    }
  }
}
menu nicklist,query {
  -
  Whois:nickinfo $$1
  -
}

Comments

Sign in to comment.
xDaeMoN   -  Nov 26, 2005

@ greenlantern420, no need to swear.

For your request, Do ALT-O -> Mouse -> On the right side, change \"/query $$1\" to \"nickinfo $$1\" in the Nick List box. You also have to remove the \"-l\" in the \"Alias -l nickinfo\" in this script for it to work.

 Respond  
Foamy   -  Nov 26, 2005

Thanks. Oh, my bad then. xX; Thanks

 Respond  
Yoinx   -  Nov 26, 2005

Nice, but remember not all server use the \'is registered nick\' raw.

 Respond  
Foamy   -  Nov 26, 2005

greenlanter420, keep the language down. And don\'t argue please.

 Respond  
greenlanter420   -  Nov 26, 2005

like who the fuck replys to something with that gee theres fuckin usefull information shut the fuck up next time rain7

 Respond  
rain7   -  Nov 22, 2005

on me:*:JOIN:#:/who $chan

 Respond  
greenlanter420   -  Nov 19, 2005

it works nice but its kinda annoying having to right click then select whois how do I make it so it works on double click?

 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.