All pastes #564516 Raw Edit

Something

public text v1 · immutable
·published 2007-06-13 17:04 UTC
rendered paste body
On $*:text:/^[!@.]set p(cw|cworld)/Si:#superpcw.staff:{
  if ($nick isop $chan) || ($nick ishop $chan) { 
    if ($3 isnum 2-144) {
      .hadd -m fastpcw world $3
      .hadd -m fastpcw setter $nick
      .hadd -m fastpcw tset $ctime
      .msg $chan World: $hget(fastpcw, world) Set by: $hget(fastpcw, setter) Set for: $duration($calc($ctime - $hget(fastpcw, tset)))
      .msg #superpcw 7New World Set by:4 $hget(fastpcw, setter)
    }
    else { 
      .notice $nick error: $3 is not number
    }
  }
}
On $*:text:/^[!@.](pcw|world|w)/Si:#superpcw:{
  if ($hget(fastpcw, world) != $null) {
    .notice $nick 4[World]2 $hget(fastpcw, world) $iif(($hget(fastpcw, suggested) != $null),4[Suggested]2 $hget(fastpcw, suggested) 4[Suggested by]2 $hget(fastpcw, suggester),$null) 4[Set by]2 $hget(fastpcw, setter) 4[Set for]2 $duration($calc($ctime - $hget(fastpcw, tset)))
  }
  else {
    .notice $nick  No current world atm
  }
}
On $*:text:/^[!@.]suggest/Si:#superpcw:{
  if ($nick !isreg $chan) { 
    if ($2 isnum 2-144) {
      .hadd -m fastpcw suggested $2
      .hadd -m fastpcw suggester $nick
      .msg #superpcw.staff $nick has suggested $2 if this is abuse use !bibi $nick
      .msg #superpcw There is now a suggested world -> suggested by $nick
    }
    else { 
      .notice $nick error: $3 is not number
    }
  }
}