mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-01 00:19:30 +01:00
Factoids: fact
no longer adds ref channel to output
This commit is contained in:
parent
947082f2a2
commit
5f4b2989a1
@ -84,6 +84,7 @@ sub cmd_call_factoid($self, $context) {
|
||||
$context->{keyword} = $trigger;
|
||||
$context->{trigger} = $trigger;
|
||||
$context->{ref_from} = $channel;
|
||||
$context->{no_ref_from} = 1;
|
||||
$context->{arguments} = $args // '';
|
||||
$context->{root_keyword} = $trigger;
|
||||
|
||||
|
@ -20,11 +20,10 @@ sub interpreter($self, $context) {
|
||||
# trace context and context's contents
|
||||
if ($self->{pbot}->{registry}->get_value('general', 'debugcontext')) {
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Sortkeys = sub { [sort grep { not /(?:cmdlist|arglist)/ } keys %$context] };
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
$Data::Dumper::Indent = 2;
|
||||
$self->{pbot}->{logger}->log("Factoids::interpreter\n");
|
||||
$self->{pbot}->{logger}->log(Dumper $context);
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
}
|
||||
|
||||
if (not length $context->{keyword}) {
|
||||
@ -302,7 +301,7 @@ sub handle_action($self, $context, $action) {
|
||||
|
||||
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}] " : '';
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4854,
|
||||
BUILD_REVISION => 4855,
|
||||
BUILD_DATE => "2024-11-21",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user