All pastes #349485 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-10 21:09 UTC
rendered paste body
ON $*:TEXT:/[@\.!]price*/Si:#:{
  if ($me != %bot.nobot) && ($me != %bot.rep) {
    inc %p
    if ($readini($+($nofile($scriptdir),channels.ini),-n,$chan,allowpublic) == YES) { 
      /set $+(%,price.send.,%p) $iif($left($1,1) == @,msg $chan,notice $nick) 2[14-7PRICE14-2]7 
    }
    else {
      /set $+(%,price.send.,%p) 2[14-7PRICE14-2]7 
    }
    if (%active. [ $+ [ $chan ] ] == YES) {
      if ($read($+($nofile($scriptdir),blacklist_users.txt), w,$address($nick,2))) {
        $+(%,price.send.,%p) Error: You are on the $me users blacklist, that means that you cant use any of my commands.
        halt
      }
      else {
        if ($2- == $null) { $+(%,price.send.,%p) Error: Please specify an item!. | halt }
        else {
          /set $+(%,price.item.,%p) $replace($2-,$chr(32),$chr(43),$chr(95),$chr(43))
          /sockopen $+(%,price.,%p) slushpuppy.silverinterlocution.org 80
        }
      }
    }
    else {
      $+(%,price.send,%p) Error: This channel havent activated the bot!.
    }
  }
}

ON *:SOCKOPEN:price.*:{
  /sockwrite -nt $sockname GET /price.php?price= [ $+ [ $+(%,price.item.,%p) ] ] HTTP/1.1
  /sockwrite -nt $sockname Host: slushpuppy.silverinterlocution.org $+ $str($crlf,2)
}

ON *:SOCKREAD:price.*:{
  if ($sockerr) { $+(%,price.send,%p) There Was A Error While Processing Information On This Script, Please Contact Anyone On %bot.commandchan $+ . | halt }
  else {
    var %price.read
    /sockread $nohtml(%price.read)
    if (*does not exist* iswm %price.read) {
      $+(%,price.send,%p) The item you selected ( $+ $replace($+(%,price.item.,%p),$chr(43),$chr(32)) $+ ) doesnt exists/is bad wroten.
    }
    else {
      /tokenize 32 %price.read
      $+(%,price.send,%p) $1-
    }
  }
}