mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
NickAuth & User: Fix nick auth + gpg auth when secure flag is on. Closes GH-825.
This commit is contained in:
parent
92c76044ec
commit
a440d6ddf4
@ -161,7 +161,12 @@ class NickAuth(callbacks.Plugin):
|
||||
if not user:
|
||||
user = ircdb.users.getUserFromNick(irc.network, theirnick)
|
||||
if user:
|
||||
try:
|
||||
user.addAuth(prefix)
|
||||
except ValueError:
|
||||
irc.error(_('Your secure flag is true and your hostmask '
|
||||
'doesn\'t match any of your known hostmasks.'),
|
||||
Raise=True)
|
||||
ircdb.users.setUser(user, flush=False)
|
||||
irc.reply(_('You are now authenticated as %s.') % user.name)
|
||||
else:
|
||||
|
@ -522,7 +522,12 @@ class User(callbacks.Plugin):
|
||||
found = False
|
||||
for (id, user) in ircdb.users.items():
|
||||
if keyid in [x[-len(keyid):] for x in user.gpgkeys]:
|
||||
try:
|
||||
user.addAuth(msg.prefix)
|
||||
except ValueError:
|
||||
irc.error(_('Your secure flag is true and your '
|
||||
'hostmask doesn\'t match any of your '
|
||||
'known hostmasks.'), Raise=True)
|
||||
ircdb.users.setUser(user, flush=False)
|
||||
irc.reply(_('You are now authenticated as %s.') %
|
||||
user.name)
|
||||
|
Loading…
Reference in New Issue
Block a user