mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Admin: Fix python 3.4 support.
This commit is contained in:
parent
fa3707ed66
commit
710d16f301
@ -355,7 +355,7 @@ class Admin(callbacks.Plugin):
|
|||||||
|
|
||||||
Perform <command> (with associated <arg>s on all channels on current network."""
|
Perform <command> (with associated <arg>s on all channels on current network."""
|
||||||
for channel in irc.state.channels:
|
for channel in irc.state.channels:
|
||||||
msg = ircmsgs.IrcMsg(msg=msg, args=(channel, *msg.args[1:]))
|
msg = ircmsgs.IrcMsg(msg=msg, args=(channel,) + msg.args[1:])
|
||||||
self.Proxy(irc.getRealIrc(), msg, commandAndArgs)
|
self.Proxy(irc.getRealIrc(), msg, commandAndArgs)
|
||||||
acmd = wrap(acmd, ['admin', many('something')])
|
acmd = wrap(acmd, ['admin', many('something')])
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ class AdminTestCase(PluginTestCase):
|
|||||||
msgs.append(msg)
|
msgs.append(msg)
|
||||||
msg = self.irc.takeMsg()
|
msg = self.irc.takeMsg()
|
||||||
self.assertCountEqual(
|
self.assertCountEqual(
|
||||||
[(msg.command, *msg.args) for msg in msgs],
|
[(msg.command,) + msg.args for msg in msgs],
|
||||||
[("PRIVMSG", "#foo", "hi #foo"), ("PRIVMSG", "#bar", "hi #bar")])
|
[("PRIVMSG", "#foo", "hi #foo"), ("PRIVMSG", "#bar", "hi #bar")])
|
||||||
|
|
||||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||||
|
@ -209,7 +209,14 @@ class User(callbacks.Plugin):
|
|||||||
password>. Obviously this message must be sent to the bot
|
password>. Obviously this message must be sent to the bot
|
||||||
privately (not in a channel). If the requesting user is an owner
|
privately (not in a channel). If the requesting user is an owner
|
||||||
user, then <old password> needn't be correct.
|
user, then <old password> needn't be correct.
|
||||||
|
If the <new password> is "!", password login will be disabled.
|
||||||
"""
|
"""
|
||||||
|
if password == "!":
|
||||||
|
password = None
|
||||||
|
elif len(password) < 3:
|
||||||
|
irc.error(_('The password must be at least 3 characters long.'),
|
||||||
|
Raise=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
u = ircdb.users.getUser(msg.prefix)
|
u = ircdb.users.getUser(msg.prefix)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -1973,7 +1973,7 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
|
|||||||
|
|
||||||
def do906(self, msg):
|
def do906(self, msg):
|
||||||
log.warning('%s: SASL authentication aborted', self.network)
|
log.warning('%s: SASL authentication aborted', self.network)
|
||||||
self.tryNextSaslMechanism(msg)
|
self.tryNextSaslMechanism(msg) # TODO: should not try this in state INIT_WAITING_MOTD (set when sending CAP END because of exhausted list of SASL mechs)
|
||||||
|
|
||||||
def do907(self, msg):
|
def do907(self, msg):
|
||||||
log.warning('%s: Attempted SASL authentication when we were already '
|
log.warning('%s: Attempted SASL authentication when we were already '
|
||||||
|
Loading…
Reference in New Issue
Block a user