From 27deaaa7b28c136f17bd57a66c37bc7e8e47bdf8 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 22 Mar 2003 01:49:33 +0000 Subject: [PATCH] Fixed UnboundLocal bugs, caused by not returning after irc.error. --- src/privmsgs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/privmsgs.py b/src/privmsgs.py index c42b94e15..0fbacfe81 100644 --- a/src/privmsgs.py +++ b/src/privmsgs.py @@ -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)