trunquit.pl
1 use Irssi;
2 use vars qw($VERSION %IRSSI);
3 $VERSION = '0.9';
4 %IRSSI = (
5 authors => 'Mathieu Doidy',
6 contact => 'mdoidy at roulaize dot net',
7 name => 'trunquit',
8 description => 'trunks quit msgs',
9 license => 'GPLv2',
10 url => 'http://irssi.roulaize.net',
11 changed => '14/11/2003',
12 );
13
14 Irssi::settings_add_int( 'misc', 'trunquit_max_quit_length', 100 );
15
16 Irssi::signal_add_first(
17 'message quit' => sub {
18 $_[3] =
19 substr( $_[3], 0,
20 Irssi::settings_get_int('trunquit_max_quit_length') );
21 Irssi::signal_continue(@_);
22 }
23 );