mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 02:24:25 +01:00
FactoidCommands: allow non-admins to inspect factset values on factoids they do not own, and to be able to factset admin
on any factoids instead of using factchange
This commit is contained in:
parent
15aaa6fa1a
commit
02c8cfd83b
@ -52,7 +52,6 @@ our %factoid_metadata_levels = (
|
||||
'effective-level' => 20,
|
||||
'persist-key' => 20,
|
||||
'interpolate' => 10,
|
||||
'action' => 10,
|
||||
# all others are allowed to be factset by anybody/default to level 0
|
||||
);
|
||||
|
||||
@ -573,12 +572,12 @@ sub factset {
|
||||
}
|
||||
}
|
||||
|
||||
if(defined $owner_channel) {
|
||||
if (defined $owner_channel) {
|
||||
my $factoid = $self->{pbot}->{factoids}->{factoids}->hash->{$owner_channel}->{$owner_trigger};
|
||||
|
||||
my ($owner) = $factoid->{'owner'} =~ m/([^!]+)/;
|
||||
|
||||
if(lc $nick ne lc $owner and $level == 0) {
|
||||
if ((defined $value and $key ne 'action') and lc $nick ne lc $owner and $level == 0) {
|
||||
return "You are not the owner of $trigger.";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user