All pastes #98757 Raw Edit

Something

public text v1 · immutable
#98757 ·published 2006-07-24 19:58 UTC
rendered paste body
alias -l dns {
  /sockopen LocationScript dnsstuff.com 80
}
ON *:sockopen:locationscript: {
  sockwrite -n $sockname Get /tools/ptr.ch?ip= $+ $address(%nick,2)
  sockwrite -n $sockname HOST: dnsstuff.com $+ $crlf $+ $crlf
}
On *:sockread:LocationScript: {   
  if ($sockerr) {
    echo -a Error.
    halt
  }
  else {
    var %temptext
    sockread %temptext
    if (*location* iswm %temptext) { echo $htmlfree(%temptext) }
  }
}
alias -l htmlfree {
  ; It's local because it won't be used by the command line, only this file.
  ; Local aliases avoid conflicting names.
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}