Fix apostrophe in expand action arguments, and fix regex

This commit is contained in:
Pragmatic Software 2015-06-26 00:10:23 -07:00
parent 7c19ebbd7b
commit 144c3ec63b
1 changed files with 2 additions and 1 deletions

View File

@ -333,6 +333,7 @@ sub find_factoid {
sub expand_action_arguments {
my ($self, $action, $input, $nick) = @_;
$input =~ s/'/\\'/g;
my @args = shellwords($input);
if (not defined $input or $input eq '') {
@ -521,7 +522,7 @@ sub interpreter {
$action = $self->expand_action_arguments($action, $arguments, defined $tonick ? $tonick : $nick);
$arguments = "";
} else {
if($action !~ /^\/.+? /) {
if($action !~ /^\/.+? / and $self->{factoids}->hash->{$channel}->{$keyword}->{type} eq 'text') {
if ($self->{pbot}->{nicklist}->is_present($from, $arguments)) {
$action =~ s/^/\/say $arguments: $keyword is / unless defined $tonick;
} else {