mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Import ircmsgs.modes() from ubotufr.
This commit is contained in:
parent
ed5f79c053
commit
dbf1640b38
@ -754,6 +754,16 @@ def mode(channel, args=(), prefix='', msg=None):
|
|||||||
args = tuple(map(str, args))
|
args = tuple(map(str, args))
|
||||||
return IrcMsg(prefix=prefix, command='MODE', args=(channel,)+args, msg=msg)
|
return IrcMsg(prefix=prefix, command='MODE', args=(channel,)+args, msg=msg)
|
||||||
|
|
||||||
|
def modes(channel, args=(), prefix='', msg=None):
|
||||||
|
"""Returns a MODE to quiet each of nicks on channel."""
|
||||||
|
if conf.supybot.protocols.irc.strictRfc():
|
||||||
|
assert isChannel(channel), repr(channel)
|
||||||
|
modes = args
|
||||||
|
if msg and not prefix:
|
||||||
|
prefix = msg.prefix
|
||||||
|
return IrcMsg(prefix=prefix, command='MODE',
|
||||||
|
args=[channel] + ircutils.joinModes(modes), msg=msg)
|
||||||
|
|
||||||
def limit(channel, limit, prefix='', msg=None):
|
def limit(channel, limit, prefix='', msg=None):
|
||||||
return mode(channel, ['+l', limit], prefix=prefix, msg=msg)
|
return mode(channel, ['+l', limit], prefix=prefix, msg=msg)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user