All pastes #133777 Raw Edit

Mine

public text v1 · immutable
#133777 ·published 2006-08-16 02:48 UTC
rendered paste body
on $*:text:/^[!](buy|buying)/Si:#huskrfreak88:{
  /set $+(%,$nick,.buy) $2-
  .notice $nick 7You are now buying:12 $2-
  .msg $chan 7 $+ $nick is now buying:12 $2-
  /set %sell.txt $read(sell.txt, w, $+(*,$replace($2-,$chr(32),$chr(42)),*))
  if (!%sell.txt) {
    .notice $nick 3No match found!
    /write buy.txt $nick is buying $2-
    .notice $nick 3Added your 12buying 3request to database.
  }
  else {
    .notice $nick 3 $+ %sell.txt
    .notice $nick 3Did not add your request to the database.
  }
}


on *:text:!bought *:#huskrfreak88:{
  if (!$($+(%,$nick,.buy),2)) {
    .notice $nick 7You weren't buying anything!
  }
  else {
    .notice $nick 7You are no longer buying:12 $($+(%,$nick,.buy),2)
    .msg $chan 7 $+ $nick bought the:12 $($+(%,$nick,.buy),2)
    /write -dw $+($nick,*,$2,*) buy.txt    
    /unset $+(%,$nick,.buy)  
    .notice $nick 3Removed your 12buying 3request from the database.
  }
}



on $*:text:/^[!](selling|sell)/Si:#huskrfreak88:{
  /set $+(%,$nick,.sell) $2-
  .notice $nick 7You are now selling:12 $2-
  .msg $chan 7 $+ $nick is now selling:12 $2-
  /set %buy.txt $read(buy.txt, w, $+(*,$replace($2-,$chr(32),$chr(42)),*))
  if (!%buy.txt) {
    .notice $nick 3No match found!
    /write sell.txt $nick is selling $2-
    .notice $nick 3Added your 12selling 3request to the database.
  }
  else {
    .notice $nick 3 $+ %buy.txt
    .notice $nick 3Did not add your request to the database.
  }
}

on *:text:!sold *:#huskrfreak88:{
  if (!$($+(%,$nick,.sell),2)) {
    .notice $nick 7You weren't selling anything!
  }
  else {
    .notice $nick 7You are no longer selling:12 $($+(%,$nick,.sell),2)
    .msg $chan 7 $+ $nick sold the:12 $($+(%,$nick,.sell),2)
    /write -dw $+($nick,*,$2,*) sell.txt    
    /unset $+(%,$nick,.sell)  
    .notice $nick 3Removed you 12selling 3request from the database.
  }
}