summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-04-06 10:12:53 -0500
committerNeil Moore <neil@s-z.org>2012-04-06 10:12:53 -0500
commite0f37c7d56edafcd0ec3aa064fdf2cea95d77ef9 (patch)
tree63f287a1d79b0a2ff020767a14fd6f76d52cb92d
parent6ad7390aa31303ba12b27435e84669e5910db946 (diff)
downloadcrawlbot-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.pm6
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);