From 9b2996b53297df1fb5c4f17ae5f2023bba169b1e Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 12 Jan 2010 14:22:25 -0500 Subject: [PATCH] should make it respond to "hi perlbot" now --- lib/Bot/BB3/Roles/IRC.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Bot/BB3/Roles/IRC.pm b/lib/Bot/BB3/Roles/IRC.pm index 43da5b1..f89d174 100644 --- a/lib/Bot/BB3/Roles/IRC.pm +++ b/lib/Bot/BB3/Roles/IRC.pm @@ -303,6 +303,12 @@ sub _said { $said->{addressed} = 1; $said->{addressed_as} = $1; } + elsif ($body =~ s/\s*\b($name_re)\s*$//) + { + $said->{body} = $body; + $said->{addressed} = 1; + $said->{addressed_as} = $1; + } } #--------------------------