Skip Menu |

This queue is for tickets about the Bot-BasicBot CPAN distribution.

Report information
The Basics
Id: 95785
Status: open
Priority: 0/
Queue: Bot-BasicBot

People
Owner: Nobody in particular
Requestors: meshach.mitchell [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bot Incorrectly think it's being addressed
Date: Mon, 19 May 2014 13:44:24 -0500
To: bug-Bot-BasicBot [...] rt.cpan.org
From: Meshach Mitchell <meshach.mitchell [...] gmail.com>
... if it the first word of the message starts of the same as the bot name, fixed with: --- /usr/local/share/perl/5.18.2/Bot/BasicBot.pm.old 2014-05-19 13:41:37.641138847 -0500 +++ /usr/local/share/perl/5.18.2/Bot/BasicBot.pm 2014-05-19 13:39:24.449124240 -0500 @@ -666,13 +666,13 @@ if ($mess->{channel} ne "msg") { my $own_nick = $self->nick; - if ($mess->{body} =~ s/^(\Q$own_nick\E)\s*[:,-]?\s*//i) { + if ($mess->{body} =~ s/^(\Q$own_nick\E)\b\s*[:,-]?\s*//i) { $mess->{address} = $1; } for my $alt_nick ($self->alt_nicks) { last if $mess->{address}; - if ($mess->{body} =~ s/^(\Q$alt_nick\E)\s*[:,-]?\s*//i) { + if ($mess->{body} =~ s/^(\Q$alt_nick\E)\b\s*[:,-]?\s*//i) { $mess->{address} = $1; } } -- Meshach Mitchell
From: alex.jakimenko [...] gmail.com
On Mon May 19 14:44:53 2014, meshach.mitchell@gmail.com wrote: Show quoted text
> ... if it the first word of the message starts of the same as the bot name, > fixed with: > > --- /usr/local/share/perl/5.18.2/Bot/BasicBot.pm.old 2014-05-19 > 13:41:37.641138847 -0500 > +++ /usr/local/share/perl/5.18.2/Bot/BasicBot.pm 2014-05-19 > 13:39:24.449124240 -0500 > @@ -666,13 +666,13 @@ > if ($mess->{channel} ne "msg") { > my $own_nick = $self->nick; > > - if ($mess->{body} =~ s/^(\Q$own_nick\E)\s*[:,-]?\s*//i) { > + if ($mess->{body} =~ s/^(\Q$own_nick\E)\b\s*[:,-]?\s*//i) { > $mess->{address} = $1; > } > > for my $alt_nick ($self->alt_nicks) { > last if $mess->{address}; > - if ($mess->{body} =~ s/^(\Q$alt_nick\E)\s*[:,-]?\s*//i) { > + if ($mess->{body} =~ s/^(\Q$alt_nick\E)\b\s*[:,-]?\s*//i) { > $mess->{address} = $1; > } > } > > -- Meshach Mitchell
It has been 2 years. May this be applied already?