use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = '0.9';
%IRSSI   = (
    authors     => 'Mathieu Doidy',
    contact     => 'mdoidy at roulaize dot net',
    name        => 'trunquit',
    description => 'trunks quit msgs',
    license     => 'GPLv2',
    url         => 'http://irssi.roulaize.net',
    changed     => '14/11/2003',
);

Irssi::settings_add_int( 'misc', 'trunquit_max_quit_length', 100 );

Irssi::signal_add_first(
    'message quit' => sub {
        $_[3] =
          substr( $_[3], 0,
            Irssi::settings_get_int('trunquit_max_quit_length') );
        Irssi::signal_continue(@_);
    }
);
