All pastes #261766 Raw Edit

Miscellany

public text v1 · immutable
#261766 ·published 2006-11-29 21:06 UTC
rendered paste body
ON *:TEXT:!price*:#: {
  set %cash.nick .notice $nick
  set %cash.item $replace($$2-,$chr(32),+)
  set %cash.item1 $2-
  if $sock(cash) { /sockclose cash }
  else {
    /sockopen cash slushpuppy.silverinterlocution.org 80
  }
}

on *:Sockopen:cash: {
  sockwrite -nt $sockname GET /price.php?price= $+ %cash.item HTTP/1.1
  sockwrite -nt $sockname HOST: slushpuppy.silverinterlocution.org $+ $crlf $+ $crlf
}

on *:SOCKREAD:cash: {
  if $sockerr {
    %cash.nick 5Sorry, there has been an 2error2.
    unset %cash.nick
    unset %cash.item 
  }
  else {
    var %cashput
    sockread -f %cashput
    set %cashput $remove(%cashput,<br>)
    %cash.nick %cashput
    /sockclose cash
    unset %cash.nick
    unset %cash.item
    unset %cash.item1
    halt
  }
}