All pastes #1643502 Raw Edit

Channel Limit

public text v1 · immutable
#1643502 ·published 2009-10-26 08:12 UTC
rendered paste body
on *:JOIN:#fd: {
  if ($nick == $me) { halt }
  elseif ($me isop $chan) {
    if (%time.check == yes) { halt }
    set %channel.amount $nick(#,0)
    set %limit $calc(%channel.amount + 2)
    set -u60 %time.check yes
    timerchanlimit 1 $r(3,20) mode $chan +l %limit
    echo -a Set Channel limit to %limit after channel join
  }
}

on *:PART:#fd: {
  if ($nick == $me) { halt }
  set %limit $calc(%limit - 1)
  mode $chan +l %limit
  echo -a Set Channel limit to %limit after channel part
}

on *:QUIT: {
  if ($chan == #fd) {
    set %limit $calc(%limit - 1)
    mode $chan +l %limit
    echo -a Set Channel limit to %limit after channel quit
  }
}