mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-16 23:39:22 +01:00
Fixed UnboundLocal bugs, caused by not returning after irc.error.
This commit is contained in:
parent
d91b9e95ef
commit
27deaaa7b2
@ -590,7 +590,7 @@ class AdminCommands(callbacks.Privmsg):
|
||||
"""
|
||||
s = getArgs(args)
|
||||
if ircdb.checkCapability(msg.prefix, 'admin'):
|
||||
if s.translate(string.ascii, string.ascii_letters) != '':
|
||||
if s.translate(string.ascii, string.ascii_letters) == '':
|
||||
irc.error(msg, 'Prefixes cannot contain letters.')
|
||||
else:
|
||||
conf.prefixChars = s
|
||||
@ -992,6 +992,7 @@ class UserCommands(callbacks.Privmsg):
|
||||
name = ircdb.users.getUserName(msg.prefix)
|
||||
except KeyError:
|
||||
irc.error(msg, conf.replyNoUser)
|
||||
return
|
||||
else:
|
||||
name = getArgs(args)
|
||||
try:
|
||||
@ -1034,6 +1035,7 @@ class UserCommands(callbacks.Privmsg):
|
||||
u = ircdb.users.getUser(name)
|
||||
except KeyError:
|
||||
irc.error(msg, conf.replyNoUser)
|
||||
return
|
||||
if u.checkPassword(password):
|
||||
u.unsetAuth()
|
||||
ircdb.users.setUser(name, u)
|
||||
|
Loading…
Reference in New Issue
Block a user