From: Matt S Trout Date: Wed, 16 Feb 2011 20:23:04 +0000 (+0000) Subject: support ACTION (ugly but working) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=90e3c2f8eed89f1f1492498a990dbfbf807b1dce;p=scpubgit%2FClifton.git support ACTION (ugly but working) --- diff --git a/lib/App/Clifton/Tower/IRC.pm b/lib/App/Clifton/Tower/IRC.pm index 982d94f..ccba44c 100644 --- a/lib/App/Clifton/Tower/IRC.pm +++ b/lib/App/Clifton/Tower/IRC.pm @@ -19,7 +19,8 @@ sub BUILD { my ($self, $args) = @_; my $on_setup = $args->{on_setup}; $self->irc_client->configure( - on_message_text => $self->_replace_weakself('receive_irc_message') + on_message_text => $self->_replace_weakself('receive_irc_message'), + on_message_ctcp_ACTION => $self->_replace_weakself('receive_irc_message') ); $self->irc_client->login( nick => $self->irc_nick, host => $self->irc_server, @@ -64,6 +65,8 @@ sub receive_irc_message { return if $hints->{prefix_is_me}; if (my $chain = $self->chains->{$hints->{target_name}}) { $chain->handle_irc_message($message, $hints); + } elsif ($chain = $self->chains->{$hints->{targets}}) { + $chain->handle_irc_message($message, $hints); } }