All pastes #271363 Raw Edit

Someone

public text v1 · immutable
·published 2006-12-08 04:57 UTC
rendered paste body
alias -l c1 return $+(14,$1-,)
alias -l c2 return $+(07,$1-,)


on *:TEXT:!defineworld*:#pestops: {
  if ($nick isop #) || ($nick ishop #) && ($$2 isnum) {
    if (%ownpc == $2) notice $nick The current world is already %ownpc
    elseif ($istok(%pcworlds,$2,44) == $false) notice $nick World $2 may not be set $chr(91) $+ F2p World $+ $chr(93) 
    else {
      set %ownpc $$2
      set %ownpc $+ .time $ctime
      set %ownpc $+ .nick $nick
      hfree flood
      unset %spamcount
      /notice $nick New PC world set to %ownpc
      /msg #pest $c2(The current) $c1(pc-world) $c1(has been changed!) $c1(-) $c2(Type: !world)
      /notice #pest $c2(The current) $c1(pc-world) $c1(has been changed!) $c1(-) $c2(Type: !world) 
    }
  }
}
on $*:text:/^[@!]world/Si:#pest,#pestops: {
  if (!%ownpc) halt
  elseif ($hget(flood,$nick) >= 1) halt
  elseif ($hget(blacklist,$nick) == 1) halt
  elseif (%spam == 1) {
    halt
  }
  else { 
    /notice $nick $c1(Current PC World:) $c2(%ownpc) $c1(- Updated:) $c2($duration($calc($ctime - $eval($+(%,ownpc,.time),2)))) $c1(ago)
    hinc -mu120 flood $nick 1
    inc -u15 %spamcount 1
    if (%spamcount >= 15) {
      set -u30 %spam 1
      unset %spamcount
      msg # $c1(Bot flooded -) $c2(!world) $c1(command is off for) $c2(30 Seconds)
    }
  }
}

on $*:text:/^[@!]pcbl/Si:#pest,#pestops: {
  if ($nick isop $chan) || ($nick ishop $chan) {
    if (!$2) halt
    if ($hget(blacklist,$address($2,2)) == 1) {
      msg $chan $c1(The address) $c2($address($2,2)) $c1(is already blacklisted)
    }
    elseif (!$2) halt
    else {
      hinc -m blacklist $address($2,2) 1
      msg $chan $c1($2 has been) $c2(blacklisted) $c1(under the address) $c2($address($2,2)) $c1(- This is a temporary ban)
    }
  }
}
on $*:text:/^[@!]pcwl/Si:#pest,#pestops: {
  if ($nick isop $chan) || ($nick ishop $chan) {
    if (!$2) halt
    if ($hget(blacklist,$address($2,2)) != 1) {
      msg $chan $c1(The address of) $c2($address($2,2)) $c1(for) $c2($2) $c1(isn't currently blacklisted)
    }
    else {
      hdel blacklist $address($2,2)
      msg $chan $c1($2 has been) $c2(whitelisted) $c1(under the address) $c2($address($2,2)) $c1(- He/She may now use the world script)
    }
  }
}

on *:join:#pest: {
  if (%reconnect) {
    if ($nick == $me) {
      /msg #pest Server reconnect $chr(35) $+ %rc - Last world change: $duration($calc($ctime - $eval($+(%,ownpc,.time),2))) ago
      unset %reconnect
    }
  }
  else halt
}

raw 439:*: {
  if (!%ownpc) halt
  else {
    /unset %spam
    /unset %spamcount
    /inc %rc 1
    /server irc.swiftirc.net
    /set %reconnect 1
  }
}