All pastes #358923 Raw Edit

Stuff

public text v1 · immutable
·published 2007-02-16 13:46 UTC
rendered paste body
on *:INPUT:#:{
  if ($1 == !urban) {
    sockclose urban
    unset %word
    set %word $2
    sockopen urban parsers.o-ss.net 80
    halt
  }
}

on *:SOCKOPEN:urban:{
  sockwrite -n $sockname GET /urban.php?word= $+ %word HTTP/1.1
  sockwrite -n $sockname host: parsers.o-ss.net
  sockwrite -n $sockname $crlf 
}

on *:SOCKREAD:urban:{
  if ($sockerr) {
    echo -a Errors: $sock($sockname)
    halt
  }
  var %urban
  sockread %urban
  if (*END* iswm %urban) {
    tokenize 32 %urban
    echo -a 7[4 URBAN 7]6 $remove($1-,END)
  }
}