diff --git a/plugins/factoids.pm b/plugins/factoids.pm index 7d29b8e..03ef56b 100644 --- a/plugins/factoids.pm +++ b/plugins/factoids.pm @@ -91,6 +91,8 @@ sub get_namespaced_factoid { $channel = $forcechan // $channel; $server = $forceserver // $server; + return $body if $channel eq '*irc_msg' or $channel eq '##NULL'; + warn "NAMESPACE: [ $channel , $server ]"; my $conf = $self->get_conf_for_channel($pm, $server, $channel); @@ -156,9 +158,10 @@ sub command { my $commands_re = join '|', keys %commandhash; $commands_re = qr/$commands_re/; - if ($conf->{namespaced}) { + if ($conf->{namespaced} || $said->{channel} eq '*irc_msg') { # Parse body here my $body = $said->{body}; + $said->{channel} = "##NULL" if $said->{channel} eq '*irc_msg'; if ($body =~ /^(?$commands_re)\s+(?.*)$/){ my ($command, $fact) = @+{qw/command fact/};