mIRC Home    About    Download    Register    News    Help

Topic Options
#11599 - 16/02/03 09:59 PM how do I grab info from an /whois?
xrn0id Offline
Fjord artisan

Registered: 23/01/03
Posts: 237
Loc: USA
i want to grab the server from /whois $nick. How can a script do this?
_________________________

;Check for Life

if (%life == $null) {
goto getlife
}

Top
#11600 - 16/02/03 10:21 PM Re: how do I grab info from an /whois?
MonoSex Offline
Fjord artisan

Registered: 09/12/02
Posts: 395
Loc: Ireland
Code:
raw 312:*:{ echo The server is - $3 }


Server info is in $4-

Top
#11601 - 17/02/03 03:33 AM Re: how do I grab info from an /whois?
hyp0r Offline
Pikka bird

Registered: 16/02/03
Posts: 15
Loc: California, USA
I'm bored...



Code:
;- whois in a dialog window!
raw 311:*: {
  openwhois
  did -o whois 110 1 $2
  did -o whois 120 1 $3
  did -o whois 130 1 $4
  did -o whois 140 1 $6-
}

raw 312:*: {
  openwhois
  did -o whois 210 1 $3
  did -o whois 220 1 $4-
}

raw 317:*: {
  openwhois
  did -o whois 410 1 $duration($3)
}

raw 319:*: {
  openwhois
  %channel = 3
  while (1) {
    if ($eval($ $+ %channel,2)) {
      if ($left($eval($ $+ %channel,2),1) == @) {
        ;- oped
        did -a whois 305 $right($eval($ $+ %channel,2),-1)
      }
      elseif ($left($eval($ $+ %channel,2),1) == +) {
        ;- voiced
        did -a whois 305 $right($eval($ $+ %channel,2),-1)
      }
      else did -a whois 305 $eval($ $+ %channel,2)
    }
    else break
    inc %channel
  }
  unset %channel
}

alias openwhois {
  if (!$dialog(whois)) {
    dialog -m whois whois
  }
}

dialog whois {
  title "whois dialog"
  size -1 -1 400 320
  option pixels

  box "User", 100, 10 10 380 110
  text "Nick", 105, 20 30 60 20, right
  edit "", 110, 85 25 90 20, read
  text "User", 115, 215 30 60 20, right
  edit "", 120, 280 25 90 20, read
  text "Host", 125, 20 60 60 20, right
  edit "", 130, 85 55 285 20, read
  text "Real Name", 135, 20 90 60 20, right
  edit "", 140, 85 85 285 20, read

  box "Server", 200, 10 130 185 110
  text "Server", 205, 20 150 60 20, right
  edit "", 210, 85 145 90 20, read
  text "Server Info", 215, 20 180 60 20, right
  edit "", 220, 85 175 90 50, read multi limit 255

  box "Channels", 300, 205 130 185 180
  list 305, 220 150 155 150, read vsbar autohs

  box "Idle", 400, 10 250 185 60
  edit "", 410, 25 270 160 20, read
}


Maybe someone will find something there thatís useful, who knows, I think it's all useless. lol. Have fun with it!

Top