From: Matt S Trout Date: Fri, 18 Feb 2011 19:18:16 +0000 (+0000) Subject: don't screw up on messages with no target_name in hints X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=scpubgit%2FClifton.git don't screw up on messages with no target_name in hints --- diff --git a/lib/App/Clifton/Tower/IRC.pm b/lib/App/Clifton/Tower/IRC.pm index ccba44c..fbfef64 100644 --- a/lib/App/Clifton/Tower/IRC.pm +++ b/lib/App/Clifton/Tower/IRC.pm @@ -63,9 +63,9 @@ sub send_irc_message { sub receive_irc_message { my ($self, $message, $hints) = @_; return if $hints->{prefix_is_me}; - if (my $chain = $self->chains->{$hints->{target_name}}) { + if (my $chain = $self->chains->{$hints->{target_name}||''}) { $chain->handle_irc_message($message, $hints); - } elsif ($chain = $self->chains->{$hints->{targets}}) { + } elsif ($chain = $self->chains->{$hints->{targets}||''}) { $chain->handle_irc_message($message, $hints); } }