1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 19:26:05 -04:00

adding more correct nickname regex

This commit is contained in:
Ryan Voots 2010-03-04 11:03:28 -05:00
parent 7e0822a9e5
commit b5df54f1d5

View file

@ -54,7 +54,7 @@ sub handle {
my( $self, $said, $pm ) = @_;
my $body = $said->{body};
if( $body =~ /\(([^\)]+)\)(\+\+|--)/ or $body =~ /(\w+)(\+\+|--)/ ) {
if( $body =~ /\(([^\)]+)\)(\+\+|--)/ or $body =~ /([\w\[\]\\`_^{|}-]+)(\+\+|--)/ ) {
my( $subject, $op ) = ($1,$2);
if( $op eq '--' ) { $op = -1 } elsif( $op eq '++' ) { $op = 1 }
my $lirc = l_irc($subject) || lc $subject;