mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-02 15:34:05 +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,
|
'effective-level' => 20,
|
||||||
'persist-key' => 20,
|
'persist-key' => 20,
|
||||||
'interpolate' => 10,
|
'interpolate' => 10,
|
||||||
'action' => 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
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -578,7 +577,7 @@ sub factset {
|
|||||||
|
|
||||||
my ($owner) = $factoid->{'owner'} =~ m/([^!]+)/;
|
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.";
|
return "You are not the owner of $trigger.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user