All pastes #473395 Raw Edit

[-EvoIX-]

public text v1 · immutable
·published 2007-05-06 06:30 UTC
rendered paste body
on $*:text:/^[!](set)(pcw|world)*/si:#: {
  if ($nick !isop $chan) && ($nick !ishop $chan) {
    .notice $nick Only HalfOps+ can use this command
    { halt }
  }
  if ($2 !isnum) {
    .notice $nick $2 is not a number!
    { halt }
  }
  set %pcw [ $+ [ $chan ] ] $2
  set %setpcw.time $ctime
  set %setpcw.nick $nick
  msg $chan $grey(A new Pest Control World has been set! Type) $blue(!pcw) $grey(to see it.)
}

on $*:text:/^[!](pc|pcw|world)/si:#: {
  if (!%pcw [ $+ [ $chan ] ]) {
    .notice $nick A Pcw has not been set for $chan,type !setpcw to set the Pc world(Halfops+)
    { halt }
  }
  if ($nick isreg $chan) {
    .notice $nick You need voice to view the Pest Control World.
    { halt }
  }
  else {
    notice $nick $grey(The current PCW is) $blue(%pcw [ $+ [ $chan ] ]) $+ $grey(.Set By:) $blue(%Setpcw.nick) $grey(-) $blue($duration($calc($ctime - %setpcw.time))) $grey(ago.)
  }
}

on $*:text:/^[!](unset|delete)(pc)(w|world)?/si:#: {
  if (%pcw [ $+ [ $chan ] ]) {
    unset %pcw [ $+ [ $chan ] ]
    unset %setpcw.time [ $+ [ $chan ] ]
    unset %setpcw.nick [ $+ [ $chan ] ]
    msg $chan $grey(The PestControl World for) $blue($chan) $grey(has been deleted by:) $blue($nick)
  }
  else {
    .notice $nick There is no Pcw set for $chan $+ .
  }
}