diff options
author | Neil Moore <neil@s-z.org> | 2012-04-06 10:12:53 -0500 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-04-06 10:12:53 -0500 |
commit | e0f37c7d56edafcd0ec3aa064fdf2cea95d77ef9 (patch) | |
tree | 63f287a1d79b0a2ff020767a14fd6f76d52cb92d | |
parent | 6ad7390aa31303ba12b27435e84669e5910db946 (diff) | |
download | crawlbot-e0f37c7d56edafcd0ec3aa064fdf2cea95d77ef9.tar.gz crawlbot-e0f37c7d56edafcd0ec3aa064fdf2cea95d77ef9.zip |
Specify max message length.
This requires a patched Bot::BasicBot, but should avoid splitting messages
quite as often. The new limit of 410 bytes should leave plenty of room
(102 bytes) for the channel name etc.
-rw-r--r-- | lib/Crawl/Bot.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Crawl/Bot.pm b/lib/Crawl/Bot.pm index 3f5ecd1..0ddf57e 100644 --- a/lib/Crawl/Bot.pm +++ b/lib/Crawl/Bot.pm @@ -39,6 +39,12 @@ has plugins => ( default => sub { [__PACKAGE__->create_plugins(bot => shift)] }, ); +has max_length => ( + is => 'ro', + isa => 'Int', + default => 410 +); + sub BUILD { my $self = shift; File::Path::mkpath($self->data_dir); |