summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-02-16 20:37:46 -0600
committerJesse Luehrs <doy@tozt.net>2012-02-16 21:05:41 -0600
commitd5fc00892be26662d744705f86cae247fbbe3597 (patch)
treedf6a1a2064c65c585390a7bc7b4489830d2cd7e7
parent30eb96a11670b8cfdfacff8d9bd82ade7e9a1263 (diff)
downloadbot-flowdock-irc-d5fc00892be26662d744705f86cae247fbbe3597.tar.gz
bot-flowdock-irc-d5fc00892be26662d744705f86cae247fbbe3597.zip
don't strip off "flowdock: ", also ignore privmsgs
-rw-r--r--lib/Bot/Flowdock/IRC.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Bot/Flowdock/IRC.pm b/lib/Bot/Flowdock/IRC.pm
index 45d26f3..18bff1d 100644
--- a/lib/Bot/Flowdock/IRC.pm
+++ b/lib/Bot/Flowdock/IRC.pm
@@ -122,9 +122,18 @@ sub said {
my $self = shift;
my ($args) = @_;
+ my $address = $args->{address} || '';
+
+ return if $address eq 'msg';
+
+ # XXX: Bot::BasicBot does a lot of "helpful" munging of messages that we
+ # receive. this is annoying for this use case. look into switching to raw
+ # poco::irc at some point.
+ my $msg = ($address ? "$address: " : '') . $args->{body};
+
$self->flowdock_api->push_chat({
external_user_name => $args->{who},
- content => $args->{body},
+ content => $msg,
});
return;