mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
Limit factoid keywords to 30 characters
This commit is contained in:
parent
f71dcfcf0e
commit
d644ac04d5
@ -1131,6 +1131,8 @@ sub factfind {
|
||||
$arguments =~ s/\s+$//;
|
||||
$arguments =~ s/\s+/ /g;
|
||||
|
||||
$arguments = substr($arguments, 0, 30);
|
||||
|
||||
my $argtype = undef;
|
||||
|
||||
if($owner ne '.*') {
|
||||
|
@ -207,6 +207,12 @@ sub interpret {
|
||||
$keyword = $command;
|
||||
}
|
||||
|
||||
if (length $keyword > 30) {
|
||||
$keyword = substr($keyword, 0, 30);
|
||||
$self->{pbot}->{logger}->log("Truncating keyword to 30 chars: $keyword\n");
|
||||
}
|
||||
|
||||
|
||||
$tonick = $nick if defined $tonick and $tonick eq 'me';
|
||||
|
||||
if ($keyword !~ /^(?:factrem|forget|set|factdel|factadd|add|factfind|find|factshow|show|forget|factdel|factset|factchange|change|msg|tell|cc|eval|u|udict|ud|actiontrigger|urban|perl)$/) {
|
||||
|
Loading…
Reference in New Issue
Block a user