support ACTION (ugly but working)
Matt S Trout [Wed, 16 Feb 2011 20:23:04 +0000 (20:23 +0000)]
lib/App/Clifton/Tower/IRC.pm

index 982d94f..ccba44c 100644 (file)
@@ -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);
   }
 }