3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-28 06:49:26 +01:00

Factoids: fact no longer adds ref channel to output

This commit is contained in:
Pragmatic Software 2024-11-21 20:21:14 -08:00
parent 947082f2a2
commit 5f4b2989a1
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
3 changed files with 4 additions and 4 deletions

View File

@ -84,6 +84,7 @@ sub cmd_call_factoid($self, $context) {
$context->{keyword} = $trigger; $context->{keyword} = $trigger;
$context->{trigger} = $trigger; $context->{trigger} = $trigger;
$context->{ref_from} = $channel; $context->{ref_from} = $channel;
$context->{no_ref_from} = 1;
$context->{arguments} = $args // ''; $context->{arguments} = $args // '';
$context->{root_keyword} = $trigger; $context->{root_keyword} = $trigger;

View File

@ -20,11 +20,10 @@ sub interpreter($self, $context) {
# trace context and context's contents # trace context and context's contents
if ($self->{pbot}->{registry}->get_value('general', 'debugcontext')) { if ($self->{pbot}->{registry}->get_value('general', 'debugcontext')) {
use Data::Dumper; use Data::Dumper;
$Data::Dumper::Sortkeys = sub { [sort grep { not /(?:cmdlist|arglist)/ } keys %$context] }; $Data::Dumper::Sortkeys = 1;
$Data::Dumper::Indent = 2; $Data::Dumper::Indent = 2;
$self->{pbot}->{logger}->log("Factoids::interpreter\n"); $self->{pbot}->{logger}->log("Factoids::interpreter\n");
$self->{pbot}->{logger}->log(Dumper $context); $self->{pbot}->{logger}->log(Dumper $context);
$Data::Dumper::Sortkeys = 1;
} }
if (not length $context->{keyword}) { if (not length $context->{keyword}) {
@ -302,7 +301,7 @@ sub handle_action($self, $context, $action) {
my $ref_from = ''; my $ref_from = '';
unless ($context->{pipe} or $context->{subcmd}) { unless ($context->{no_ref_from} or $context->{pipe} or $context->{subcmd}) {
$ref_from = $context->{ref_from} ? "[$context->{ref_from}] " : ''; $ref_from = $context->{ref_from} ? "[$context->{ref_from}] " : '';
} }

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script # These are set by the /misc/update_version script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 4854, BUILD_REVISION => 4855,
BUILD_DATE => "2024-11-21", BUILD_DATE => "2024-11-21",
}; };