Fixed a latent UnboundLocalError in setsecure.

This commit is contained in:
Jeremy Fincher 2003-10-04 12:59:47 +00:00
parent 5de5a56b4a
commit 18a8725905
1 changed files with 1 additions and 2 deletions

View File

@ -36,7 +36,6 @@ Provides commands useful to users in general. This plugin is loaded by default.
import string import string
import conf import conf
import utils
import ircdb import ircdb
import ircutils import ircutils
import privmsgs import privmsgs
@ -331,6 +330,7 @@ class UserCommands(callbacks.Privmsg):
If a specific True/False value is not given, it inverts the current If a specific True/False value is not given, it inverts the current
value. value.
""" """
(password, value) = privmsgs.getArgs(args, optional=1)
if not self._checkNotChannel(irc, msg, password): if not self._checkNotChannel(irc, msg, password):
return return
try: try:
@ -338,7 +338,6 @@ class UserCommands(callbacks.Privmsg):
user = ircdb.users.getUser(id) user = ircdb.users.getUser(id)
except KeyError: except KeyError:
irc.error(msg, conf.replyNotRegistered) irc.error(msg, conf.replyNotRegistered)
(password, value) = privmsgs.getArgs(args, optional=1)
if value == '': if value == '':
value = not user.secure value = not user.secure
elif value.lower() in ('true', 'false'): elif value.lower() in ('true', 'false'):