mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-19 23:20:57 +01:00
User: Fix handling of --capability for unregistered users.
This commit is contained in:
parent
fe540b3620
commit
7253dee3ae
@ -54,10 +54,10 @@ class User(callbacks.Plugin):
|
|||||||
predicates = []
|
predicates = []
|
||||||
for (option, arg) in optlist:
|
for (option, arg) in optlist:
|
||||||
if option == 'capability':
|
if option == 'capability':
|
||||||
|
if arg in conf.supybot.capabilities.private():
|
||||||
try:
|
try:
|
||||||
u = ircdb.users.getUser(msg.prefix)
|
u = ircdb.users.getUser(msg.prefix)
|
||||||
if arg in conf.supybot.capabilities.private() and \
|
if not u._checkCapability('admin'):
|
||||||
not u._checkCapability('admin'):
|
|
||||||
raise KeyError
|
raise KeyError
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# Note that it may be raised by checkCapability too.
|
# Note that it may be raised by checkCapability too.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user