mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Added an optional key argument to cycle.
This commit is contained in:
parent
6c3e193b93
commit
1d5dfa070d
@ -85,14 +85,18 @@ class ChannelCommands(callbacks.Privmsg):
|
||||
voice = privmsgs.checkChannelCapability(voice, 'voice')
|
||||
|
||||
def cycle(self, irc, msg, args, channel):
|
||||
"""[<channel>]
|
||||
"""[<channel>] [<key>]
|
||||
|
||||
The <channel> argument is only necessary if the message isn't being
|
||||
sent in the channel itself. If you have the #channel.op capability,
|
||||
this will cause the bot to "cycle", or PART and then JOIN the channel.
|
||||
If <key> is given, join the channel using that key.
|
||||
"""
|
||||
key = privmsgs.getArgs(args, needed=0, optional=1)
|
||||
if not key:
|
||||
key = None
|
||||
irc.queueMsg(ircmsgs.part(channel))
|
||||
irc.queueMsg(ircmsgs.join(channel))
|
||||
irc.queueMsg(ircmsgs.join(channel, key))
|
||||
cycle = privmsgs.checkChannelCapability(cycle, 'op')
|
||||
|
||||
def kban(self, irc, msg, args):
|
||||
|
Loading…
Reference in New Issue
Block a user