All pastes #279896 Raw Edit

Something

public text v1 · immutable
·published 2006-12-15 12:32 UTC
rendered paste body
alias add {
  %x = $1 + $2
  return %x
}
alias minus {
  %x = $1 - $2
  return %x
}
alias times {
  %x = $1 * $2
  return %x
}
On *:TEXT:!math ***:# {
  If ( $3 == x ) {
    /msg $chan [Calc] $2 $+ * $+ $3 = $times($2,$4)
  }
  if ( $3 == + ) {
    /msg $chan [Calc] $2 $+ + $+ $3 = $add($2,$3)
  }
  if ( $3 == - )
  /msg $chan [Calc] $2 $+ - $+ $3 = $minus($2,$3)
}
}