3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 12:29:27 +01:00

Factoids: effective-level override now actually does something; add locked_to_channel metadata

This commit is contained in:
Pragmatic Software 2019-05-13 00:07:08 -07:00
parent 061ef1c6b2
commit 786d1f75b1

View File

@ -49,7 +49,7 @@ our %factoid_metadata_levels = (
locked => 10, locked => 10,
add_nick => 10, add_nick => 10,
nooverride => 10, nooverride => 10,
'effective-level' => 20, 'effective-level' => 40,
'persist-key' => 20, 'persist-key' => 20,
'interpolate' => 10, 'interpolate' => 10,
# all others are allowed to be factset by anybody/default to level 0 # all others are allowed to be factset by anybody/default to level 0
@ -1293,8 +1293,10 @@ sub factfind {
my ($from, $nick, $user, $host, $arguments) = @_; my ($from, $nick, $user, $host, $arguments) = @_;
my $factoids = $self->{pbot}->{factoids}->{factoids}->hash; my $factoids = $self->{pbot}->{factoids}->{factoids}->hash;
my $usage = "Usage: factfind [-channel channel] [-owner regex] [-editby regex] [-refby regex] [-regex] [text]";
if(not defined $arguments) { if(not defined $arguments) {
return "Usage: factfind [-channel channel] [-owner regex] [-editby regex] [-refby regex] [-regex] [text]"; return $usage;
} }
my ($channel, $owner, $refby, $editby, $use_regex); my ($channel, $owner, $refby, $editby, $use_regex);
@ -1349,7 +1351,7 @@ sub factfind {
} }
if(not defined $argtype) { if(not defined $argtype) {
return "Usage: factfind [-channel regex] [-owner regex] [-refby regex] [-editby regex] [text]"; return $usage;
} }
my ($text, $last_trigger, $last_chan, $i); my ($text, $last_trigger, $last_chan, $i);