Subject: | respond on emoted messages |
Hi!
The attached patch makes a bot using Bot-BasicBot-Pluggable-Module-RT
also respond to "emoted" messages, i.e. I can do this:
/me working on RT123
<rtbot> RT123: rev up the flux compensator
This is implemented by simply forwarding the call to C<emoted> to C<told>
I'm not sure if it would be better to implemented this higher in the
Bot-BasicBot-Pluggable hierarchy, but I needed the feature here, so here
you go...
Maybe it would also be better to only turn this feature on via some command?
anyway, thanks for the module!
Subject: | Bot-BasicBot-Pluggable-Module-RT-0.03.patch |
diff -r -u -b Bot-BasicBot-Pluggable-Module-RT-0.03-orig/lib/Bot/BasicBot/Pluggable/Module/RT.pm Bot-BasicBot-Pluggable-Module-RT-0.03/lib/Bot/BasicBot/Pluggable/Module/RT.pm
--- Bot-BasicBot-Pluggable-Module-RT-0.03-orig/lib/Bot/BasicBot/Pluggable/Module/RT.pm 2007-04-27 16:12:16.000000000 +0200
+++ Bot-BasicBot-Pluggable-Module-RT-0.03/lib/Bot/BasicBot/Pluggable/Module/RT.pm 2009-06-08 15:00:47.000000000 +0200
@@ -70,6 +70,11 @@
return $output;
}
+sub emoted {
+ my $self = shift;
+ $self->told(@_);
+}
+
sub help { q(catch anything that looks like an RT number : /RT#?\s*(\d+)/i. it requires the RT server url, a login and password. Set them using '!set RT server', '!set RT login', '!set RT password'. The information displayed can be configured by setting the output string : '!set RT output some_string'. in the string, you can use the following placeholders :
%i : id of the ticket
%q : queue of the ticket