mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-14 02:17:41 +02:00
Fix fact
command to use $stuff; increase factoid keyword length to 30
This commit is contained in:
parent
89d3596dac
commit
cea2fc66f9
@ -99,7 +99,7 @@ sub initialize {
|
|||||||
|
|
||||||
sub call_factoid {
|
sub call_factoid {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($from, $nick, $user, $host, $arguments) = @_;
|
my ($from, $nick, $user, $host, $arguments, $stuff) = @_;
|
||||||
my ($chan, $keyword, $args) = split /\s+/, $arguments, 3;
|
my ($chan, $keyword, $args) = split /\s+/, $arguments, 3;
|
||||||
|
|
||||||
if(not defined $chan or not defined $keyword) {
|
if(not defined $chan or not defined $keyword) {
|
||||||
@ -112,7 +112,10 @@ sub call_factoid {
|
|||||||
return "No such factoid '$keyword' exists for channel '$chan'";
|
return "No such factoid '$keyword' exists for channel '$chan'";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $self->{pbot}->{factoids}->interpreter($from, $nick, $user, $host, 1, $trigger, $args, undef, $channel, undef, $trigger);
|
$stuff->{keyword} = $trigger;
|
||||||
|
$stuff->{arguments} = $args;
|
||||||
|
|
||||||
|
return $self->{pbot}->{factoids}->interpreter($stuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub log_factoid {
|
sub log_factoid {
|
||||||
@ -613,7 +616,7 @@ sub factmove {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length $target > 20) {
|
if (length $target > 30) {
|
||||||
return "/say $nick: I don't think the factoid name needs to be that long.";
|
return "/say $nick: I don't think the factoid name needs to be that long.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -680,7 +683,7 @@ sub factalias {
|
|||||||
|
|
||||||
$chan = '.*' if $chan !~ /^#/;
|
$chan = '.*' if $chan !~ /^#/;
|
||||||
|
|
||||||
if (length $alias > 20) {
|
if (length $alias > 30) {
|
||||||
return "/say $nick: I don't think the factoid name needs to be that long.";
|
return "/say $nick: I don't think the factoid name needs to be that long.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -762,7 +765,7 @@ sub factadd {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length $keyword > 20) {
|
if (length $keyword > 30) {
|
||||||
return "/say $nick: I don't think the factoid name needs to be that long.";
|
return "/say $nick: I don't think the factoid name needs to be that long.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user