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

Merge branch 'master' of github.com:simcop2387/perlbuut

Conflicts:
	var/karma.db
	var/seen.db
This commit is contained in:
Ryan Voots 2010-12-22 00:33:47 -05:00
commit 0e7a79f30d

View file

@ -126,7 +126,7 @@ sub command {
#i lost the object oriented calling here, but i don't care too much, BECAUSE this avoids using strings for the calling, i might change that. #i lost the object oriented calling here, but i don't care too much, BECAUSE this avoids using strings for the calling, i might change that.
$fact_string = $commandhash{$1}->($self,$subject, $said->{name}, $said); $fact_string = $commandhash{$1}->($self,$subject, $said->{name}, $said);
} }
elsif ($subject =~ m|^\s*(.*?)\s*=~\s*s/([^/]+)/([^/]+)/([gi]*)|i) elsif ($subject =~ m|^\s*(.*?)\s*=~\s*s/([^/]+)/([^/]*)/([gi]*)|i)
{ {
$fact_string = $self->get_fact_substitute( $subject, $said->{name}, $said); $fact_string = $self->get_fact_substitute( $subject, $said->{name}, $said);
} }
@ -371,7 +371,7 @@ sub _fact_substitute
sub get_fact_substitute { sub get_fact_substitute {
my( $self, $subject, $name, $said ) = @_; my( $self, $subject, $name, $said ) = @_;
if ($said->{body} =~ m|^(?:\s*substitute)?\s*(.*?)\s*=~\s*s/([^/]+)/([^/]+)/([gi]*)\s*$|i) if ($said->{body} =~ m|^(?:\s*substitute)?\s*(.*?)\s*=~\s*s/([^/]+)/([^/]*)/([gi]*)\s*$|i)
{ {
my ($subject, $match, $subst, $flags) = ($1, $2, $3, $4); my ($subject, $match, $subst, $flags) = ($1, $2, $3, $4);