All pastes #143697 Raw Edit

Something

public text v1 · immutable
#143697 ·published 2006-08-22 03:53 UTC
rendered paste body
alias -l c1 return $+(14,$1-,)

alias -l c2 return $+(07,$1-,)

on *:TEXT:!defineworld*:#pest,#pestops: {
  if (pegasus !ison $chan) {
    if ($nick isop #) || ($nick ishop #) && ($$2 isnum) {
    if ($chan == #pest) notice $nick The world is not to be defined in this room any longer | notice $nick Please use the PestOp channel instead.
      set %ownpc $$2
      set %ownpc $+ .time $ctime
      set %ownpc $+ .nick $nick
      .notice $nick New PC world set to %ownpc
      msg #pest $c2(------) $c1(The current) $c2(pc-world) $c1(has been changed!) $c2(------)
    }
  }
}
on $*:text:/^[@!]world/Si:#pest,#pestops: {
  if (pegasus !ison $chan) {
    if ($me isop $chan) || ($me ishop $chan) {
      if ($nick !isop #) && ($nick !ishop #) {
        hinc -mu45 flood $nick 1
        if ($hget(flood,$nick) >= 3) {
          ban -ku300 $chan $nick 2 Stop spamming the bot (Temp Banned - 5 mins)
          hdel flood $nick
        }
      }
    }
    if (%spam == $null) && ((%spamcount == $null) || (%spamcount < 15)) {
      if (!%ownpc) halt
      else {
        var %send = $iif(($left($1,1) == @) && (($nick isop #) || ($nick ishop #)),.msg $chan,.notice $nick)
        %send $c1(Current PC World:) $c2(%ownpc) $+ $c1(; Last Update:) $c2($duration($calc($ctime - $eval($+(%,ownpc,.time),2)))) 
        inc -u25 %spamcount 1
      }
    }
    if (%spamcount >= 15) { 
      set -u5 %spamcount 1
      set -u30 %spam 1 
      msg $chan $c1(Bot flooded -) $c2(!world) $c1(command is off for) $c2(30 seconds)
    }
  }
}
on *:DISCONNECT: {
  /unset %spamcount
  /unset %spam
  /unset %ownpc*
}