All pastes #156023 Raw Edit

Anonymous

public text v1 · immutable
#156023 ·published 2006-08-31 14:27 UTC
rendered paste body
alias -l c1 return $+(14,$1-,)
alias -l c2 return $+(07,$1-,)

on *:TEXT:!defineworld*:#pestopss: {
  if ($nick isop #) || ($nick ishop #) && ($$2 isnum) {
    set %ownpc $$2
    set %ownpc $+ .time $ctime
    .notice $nick New PC world set to %ownpc
    msg #pest $c2(The current) $c1(pc-world) $c1(has been changed!) $c1(-) $c2(Type: !world)
    msg #pest $c2(The current) $c1(pc-world) $c1(has been changed!) $c1(-) $c2(Type: !world)
  }
}

on $*:text:/^[@!]world/Si:#pests,#pestopss: {
  if (%ownpc) {
    if ($nick !isop #) && ($nick !ishop #) {
      if (!$hget(flood,$nick)) {
        if (%spam == $null) && ((%spamcount == $null) || (%spamcount < 12)) {
          hinc -mu60 flood $nick 1
          inc -u30 %spamcount 1
          notice $nick $c1(Current PC World:) $c2(%ownpc) $+ $c1(- Last Update:) $c2($duration($calc($ctime - $eval($+(%,ownpc,.time),2))))
        }
      }
      if (%spamcount >= 12) { 
        set -u5 %spamcount 1
        set -u60 %spam 1
        msg $chan $c1(Bot flooded -) $c2(!world) $c1(command is off for) $c2(1 minute)
      }
    }
  }
}

on *:DISCONNECT: {
  /unset %spamcount
  /unset %spam
  /unset %ownpc*
}