diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-02-16 20:37:46 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-02-16 21:05:41 -0600 |
commit | d5fc00892be26662d744705f86cae247fbbe3597 (patch) | |
tree | df6a1a2064c65c585390a7bc7b4489830d2cd7e7 /lib/Bot | |
parent | 30eb96a11670b8cfdfacff8d9bd82ade7e9a1263 (diff) | |
download | bot-flowdock-irc-d5fc00892be26662d744705f86cae247fbbe3597.tar.gz bot-flowdock-irc-d5fc00892be26662d744705f86cae247fbbe3597.zip |
don't strip off "flowdock: ", also ignore privmsgs
Diffstat (limited to 'lib/Bot')
-rw-r--r-- | lib/Bot/Flowdock/IRC.pm | 11 |
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; |