mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-03 01:39:23 +01:00
Use ircutils.joinModes() instead of hacky str.join()s in ircmsgs.unbans.
This commit is contained in:
parent
74a3d61f2b
commit
ed5f79c053
@ -519,11 +519,13 @@ def unbans(channel, hostmasks, prefix='', msg=None):
|
|||||||
if conf.supybot.protocols.irc.strictRfc():
|
if conf.supybot.protocols.irc.strictRfc():
|
||||||
assert isChannel(channel), repr(channel)
|
assert isChannel(channel), repr(channel)
|
||||||
assert all(isUserHostmask, hostmasks), hostmasks
|
assert all(isUserHostmask, hostmasks), hostmasks
|
||||||
|
modes = [('-b', s) for s in hostmasks]
|
||||||
if msg and not prefix:
|
if msg and not prefix:
|
||||||
prefix = msg.prefix
|
prefix = msg.prefix
|
||||||
return IrcMsg(prefix=prefix, command='MODE', msg=msg,
|
return IrcMsg(prefix=prefix, command='MODE',
|
||||||
args=(channel, '-' + ('b'*len(hostmasks)),
|
args=[channel] + ircutils.joinModes(modes), msg=msg)
|
||||||
' '.join(hostmasks)))
|
if msg and not prefix:
|
||||||
|
prefix = msg.prefix
|
||||||
|
|
||||||
def kick(channel, nick, s='', prefix='', msg=None):
|
def kick(channel, nick, s='', prefix='', msg=None):
|
||||||
"""Returns a KICK to kick nick from channel with the message msg."""
|
"""Returns a KICK to kick nick from channel with the message msg."""
|
||||||
|
Loading…
Reference in New Issue
Block a user