mirror of
https://github.com/pragma-/pbot.git
synced 2026-03-12 01:57:55 +01:00
Factoids/Interpreter: remove confusing nick-as-argument syntax
This commit is contained in:
parent
bfe252b5c5
commit
1064900f00
@ -221,6 +221,18 @@ Examples:
|
||||
<pragma-> !give mike time
|
||||
<PBot> mike: It's Sun 31 May 2020 06:03:08 PM PDT in Los Angeles.
|
||||
|
||||
You can use redirection with `>`:
|
||||
|
||||
<command> > <nick>
|
||||
|
||||
Examples:
|
||||
|
||||
<pragma-> !echo Testing > dave
|
||||
<PBot> dave: Testing
|
||||
|
||||
<pragma-> !time > mike
|
||||
<PBot> mike: It's Sun 31 May 2020 06:03:08 PM PDT in Los Angeles.
|
||||
|
||||
You can use [inline invocation](#inline-invocation), as well -- see the next section.
|
||||
|
||||
### Inline invocation
|
||||
|
||||
@ -340,18 +340,6 @@ sub handle_action($self, $context, $action) {
|
||||
|
||||
$context->{arguments_processed} = 1;
|
||||
$context->{nickprefix_disabled} = 1;
|
||||
} else {
|
||||
# set nickprefix if args is a present nick and factoid action doesn't have $nick or $args
|
||||
if (!$context->{nickprefix_disabled} && $self->{pbot}->{factoids}->{data}->{storage}->get_data($channel, $keyword, 'type') eq 'text') {
|
||||
my $target = $self->{pbot}->{nicklist}->is_present_similar($context->{from}, $context->{arguments});
|
||||
|
||||
if ($target and $action !~ /\$\{?(?:nick|args)\b/) {
|
||||
my $add_nick = $self->{pbot}->{factoids}->{data}->{storage}->get_data($channel, $keyword, 'add_nick');
|
||||
unless (defined $add_nick && $add_nick == 0) {
|
||||
$context->{nickprefix} = $target unless $context->{nickprefix_forced};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# no arguments supplied
|
||||
|
||||
@ -25,8 +25,8 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4939,
|
||||
BUILD_DATE => "2026-02-27",
|
||||
BUILD_REVISION => 4940,
|
||||
BUILD_DATE => "2026-03-11",
|
||||
};
|
||||
|
||||
sub initialize {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user