From 7ed5433a8f719115fb9f3f719c10fe9152e171e9 Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Mon, 2 Jan 2012 19:11:56 -0500 Subject: Add a %bug command. --- lib/Crawl/Bot/Plugin/Mantis.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Crawl/Bot/Plugin/Mantis.pm b/lib/Crawl/Bot/Plugin/Mantis.pm index 6c2fe61..e6ff7be 100644 --- a/lib/Crawl/Bot/Plugin/Mantis.pm +++ b/lib/Crawl/Bot/Plugin/Mantis.pm @@ -14,6 +14,15 @@ sub item_to_id { return $id; } +sub said { + my $self = shift; + my ($args) = @_; + + if ($args->{body} =~ /^%bug (\d+)$/) { + $self->say_all("https://crawl.develz.org/mantis/view.php?id=$1"); + } +} + sub tick { my $self = shift; $self->each_current_item(sub { -- cgit v1.2.3-54-g00ecf