All pastes #275166 Raw Edit

Stuff

public text v1 · immutable
·published 2006-12-11 08:42 UTC
rendered paste body
on *:text:!search*:#: {
  if ($2) {
    hello $2
    set %cca #digatech
    set %search $2
  }
  else {
    msg # Syntax: !search item (ex: !search windows)
  }
}
on *:sockopen:hello:{
  msg %cca Retrieving Data.... Please Wait....
  sockwrite -n $sockname GET /digatech/search.php?search= [ $+ [ %search ] ] HTTP/1.1
  sockwrite -n $sockname HOST: www.digatech.net
  sockwrite -n $sockname
}
alias hello {
  if ($sock(hello).name) {
    halt
  }
  set %search $1
  write -c search.txt
  sockopen hello digatech.net 80
}
on *:sockread:hello:{
  if ($sockerr) {
    echo -a Error.
    halt
  }
  else {
    unset %temptext
    sockread %temptext
    write search.txt %temptext
  }
}

on *:sockclose:hello:{
  //msg #digatech $read(search.txt,w,*Torrent*)
  unset %search,%cca
}