summaryrefslogtreecommitdiffstats
path: root/lib/Crawl/Bot.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Crawl/Bot.pm')
-rw-r--r--lib/Crawl/Bot.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Crawl/Bot.pm b/lib/Crawl/Bot.pm
index e6a5e15..ccaa29e 100644
--- a/lib/Crawl/Bot.pm
+++ b/lib/Crawl/Bot.pm
@@ -6,6 +6,14 @@ extends 'Bot::BasicBot';
use autodie;
use XML::RAI;
+has [qw(username name)] => (
+ # don't need (or want) accessors, just want to initialize the hash slot
+ # for B::BB to use
+ is => 'bare',
+ isa => 'Str',
+ default => sub { shift->nick },
+);
+
has rss_feed => (
is => 'ro',
isa => 'Str',
@@ -91,9 +99,9 @@ sub tick {
return if $self->has_item($id);
warn "New issue! ($id)";
$self->say(
- channel => '##crawl-dev',
+ channel => $_,
body => $item->title . ' (' . $item->link . ')'
- );
+ ) for $self->channels;
$self->add_item($id);
});
$self->save_cache;