summaryrefslogtreecommitdiffstats
path: root/lib/Crawl
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-11-26 01:16:42 -0600
committerJesse Luehrs <doy@tozt.net>2009-11-26 01:16:42 -0600
commit2583b21383f2654a052513f6ff51f5688d43d2fd (patch)
tree1553944db6b9b29eda41c051611d0ec4b9e9668f /lib/Crawl
parent105f0cc71ce6fcb1c40101ab4271b70e6b4da6b3 (diff)
downloadcrawlbot-2583b21383f2654a052513f6ff51f5688d43d2fd.tar.gz
crawlbot-2583b21383f2654a052513f6ff51f5688d43d2fd.zip
clean up code for creating the issue message to be sent
Diffstat (limited to 'lib/Crawl')
-rw-r--r--lib/Crawl/Bot.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Crawl/Bot.pm b/lib/Crawl/Bot.pm
index 703982d..75e8a0d 100644
--- a/lib/Crawl/Bot.pm
+++ b/lib/Crawl/Bot.pm
@@ -104,10 +104,13 @@ sub tick {
(my $id = $link) =~ s/.*=(\d+)$/$1/;
return if $self->has_issue($id);
warn "New issue! ($id)";
+ my $message = $issue->title;
+ $message =~ s/\d+: //;
+ $message = sprintf '%s (%s) by %s',
+ $message, $issue->link, $issue->creator;
$self->say(
channel => $_,
- body => $issue->title . ' (' . $issue->link . ')'
- . ' by ' . $issue->creator
+ body => $message,
) for $self->channels;
$self->add_issue($id);
});