The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Sirc::LimitMan - simple channel limit management

SYNOPSIS

    /eval use Sirc::LimitMan

    /limitman                   # toggles management on current channel
    /limitman #mychan           # toggles management on #mychan

DESCRIPTION

This module provides a command which will do simple channel limit management. When invoked for a channel you will occasionally modify the channel's limit to keep it within a certain distance of the actual number of users. The channel can become full while limit management is in place. This is intentional, if the limit were always upped in order to allow somebody else to join, it would be pointless.

This code tries to keep the noise down by limiting the number of +l changes. A client running it considers itself the master if it's the last one who made a change to the limit. Normally the clients try to schedule themselves so that only the master keeps changing the limit, but somebody else will step in if he falls down on the job.

Settable Options

You can set these values with sirc's /set command. Most of them should really be specifiable per-channel, but they aren't. Sorry.

limitman on|off

If disabled then no limit management is done. The channels you want limit management for are still remembered, so if you enable it again later they'll kick in again. The default is on.

limitman_debug on|off

Turning this on causes the module to let you in on its cogitations. It defaults to off.

limitman_tween seconds

This is the base number of seconds between checks to see if the limit should be adjusted. The default is 60.

limitman_skew seconds

Non-masters have an additional delay between checks. Part of it is a random delay of up to limitman_skew seconds, default 30.

limitman_skew_offset seconds

An additional part of the delay for non-masters is a constant limitman_skew_offset seconds, default 15.

limitman_low count

The limit will raised if there are fewer than limitman_low free slots on the channel, default 2.

limitman_high count

The limit will lowered if there are more than limitman_high free slots on the channel, default 5.

limitman_reset count

When the limit is reset, it's set to the current number of users plus limitman_reset, default 4.

AVAILABILITY

Check CPAN or http://www.argon.org/~roderick/ for the latest version.

AUTHOR

Roderick Schertler <roderick@argon.org>

SEE ALSO

sirc(1), perl(1), Sirc::Chantrack(3pm), Sirc::Util(3pm).