mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-17 23:22:47 +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)
|
s = getArgs(args)
|
||||||
if ircdb.checkCapability(msg.prefix, 'admin'):
|
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.')
|
irc.error(msg, 'Prefixes cannot contain letters.')
|
||||||
else:
|
else:
|
||||||
conf.prefixChars = s
|
conf.prefixChars = s
|
||||||
@ -992,6 +992,7 @@ class UserCommands(callbacks.Privmsg):
|
|||||||
name = ircdb.users.getUserName(msg.prefix)
|
name = ircdb.users.getUserName(msg.prefix)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNoUser)
|
irc.error(msg, conf.replyNoUser)
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
name = getArgs(args)
|
name = getArgs(args)
|
||||||
try:
|
try:
|
||||||
@ -1034,6 +1035,7 @@ class UserCommands(callbacks.Privmsg):
|
|||||||
u = ircdb.users.getUser(name)
|
u = ircdb.users.getUser(name)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNoUser)
|
irc.error(msg, conf.replyNoUser)
|
||||||
|
return
|
||||||
if u.checkPassword(password):
|
if u.checkPassword(password):
|
||||||
u.unsetAuth()
|
u.unsetAuth()
|
||||||
ircdb.users.setUser(name, u)
|
ircdb.users.setUser(name, u)
|
||||||
|
Loading…
Reference in New Issue
Block a user