All pastes #809522 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-12-08 23:24 UTC
rendered paste body
alias pastebin {
  set %BinNumber $$1-
  sockclose pastebin
  sockopen pastebin pastebin.ca 80
}
on *:SOCKOPEN:pastebin:{
  sockwrite -nt $sockname GET / $+ %BinNumber HTTP/1.1
  sockwrite -nt $sockname Host: pastebin.ca
  sockwrite -t $sockname $str($crlf,2)
}
on *:SOCKREAD:pastebin:{
  sockread %a
  .inc %i
  if (class="pastecontent" isin %a) { .set %firstP %i }

  if (%i >= %firstP) {
    if (%deroulement == STOP) { .halt }
    else { echo -a $remove(%a, <textarea, rows="20", cols="80", id="pastearea- $+ $gettok(%a,6,34) $+ ", name="content", class="pastecontent">, $gettok(%a,6,34), id="", </textarea>, <div style="float:right">) }

  }
  if (<div style="float:right"> isin %a) { set %deroulement STOP }
}
on *:SOCKCLOSE:pastebin:{
  unset %a
  unset %i
  unset %firstP
  unset %deroulement
}