mirror of
https://github.com/progval/Limnoria.git
synced 2025-05-03 00:41:11 -05:00
Fixed a latent UnboundLocalError in setsecure.
This commit is contained in:
parent
5de5a56b4a
commit
18a8725905
@ -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'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user