Added Channel.mode.

This commit is contained in:
Jeremy Fincher 2004-07-23 01:01:29 +00:00
parent 2369a1adae
commit 35038fd376
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,5 @@
* Added Channel.mode, to set the mode in the channel.
* Added a new plugin, Format, which offers several commands for
formatting strings on IRC. Moved several commands from to it
from the Utilities plugin.

View File

@ -65,6 +65,16 @@ class Channel(callbacks.Privmsg):
if self.registryValue('alwaysRejoin', channel):
irc.sendMsg(ircmsgs.join(channel)) # Fix for keys.
def mode(self, irc, msg, args, channel):
"""[<channel>] <mode> [<arg> ...]
Sets the mode in <channel> to <mode>, sending the arguments given.
"""
if not args:
raise callbacks.ArgumentError
irc.queueMsg(ircmsgs.mode(channel, args))
mode = privmsgs.checkChannelCapability(mode, 'op')
def op(self, irc, msg, args, channel):
"""[<channel>] [<nick> ...]