diff --git a/PBot/FactoidCommands.pm b/PBot/FactoidCommands.pm index 4f1ce60b..d680d289 100644 --- a/PBot/FactoidCommands.pm +++ b/PBot/FactoidCommands.pm @@ -131,6 +131,8 @@ sub factset { } } + $channel = '.*' if $channel !~ /^#/; + my ($owner_channel, $owner_trigger) = $self->{pbot}->{factoids}->find_factoid($channel, $trigger, undef, 1); if(defined $owner_channel) { @@ -176,6 +178,8 @@ sub factunset { } } + $channel = '.*' if $channel !~ /^#/; + my ($owner_channel, $owner_trigger) = $self->{pbot}->{factoids}->find_factoid($channel, $trigger, undef, 1); if(defined $owner_channel) { @@ -372,6 +376,9 @@ sub factmove { $self->{pbot}->{factoids}->save_factoids; + $found_src_channel = 'global' if $found_src_channel eq '.*'; + $target_channel = 'global' if $target_channel eq '.*'; + if($src_channel eq $target_channel) { return "[$found_src_channel] $found_source renamed to $target"; } else {