Made the help messages more inline with the other channel-based command helps.

This commit is contained in:
Jeremy Fincher 2003-11-19 08:13:19 +00:00
parent fa7a05ab95
commit baaa01755f

View File

@ -51,9 +51,9 @@ class Channel(callbacks.Privmsg):
def op(self, irc, msg, args, channel): def op(self, irc, msg, args, channel):
"""[<channel>] """[<channel>]
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will give you ops.
sent in the channel itself. If you have the #channel.op capability, <channel> is only necessary if the message isn't sent in the channel
this will give you ops. itself.
""" """
if irc.nick in irc.state.channels[channel].ops: if irc.nick in irc.state.channels[channel].ops:
irc.queueMsg(ircmsgs.op(channel, msg.nick)) irc.queueMsg(ircmsgs.op(channel, msg.nick))
@ -64,9 +64,9 @@ class Channel(callbacks.Privmsg):
def halfop(self, irc, msg, args, channel): def halfop(self, irc, msg, args, channel):
"""[<channel>] """[<channel>]
The <channel> argument is only necessary if the message isn't being If you have the #channel.halfop capability, this will give you halfops.
sent in the channel itself. If you have the #channel.halfop <channel> is only necessary if the message isn't sent in the channel
capability, this will give you halfops. itself.
""" """
if irc.nick in irc.state.channels[channel].ops: if irc.nick in irc.state.channels[channel].ops:
irc.queueMsg(ircmsgs.halfop(channel, msg.nick)) irc.queueMsg(ircmsgs.halfop(channel, msg.nick))
@ -77,9 +77,9 @@ class Channel(callbacks.Privmsg):
def voice(self, irc, msg, args, channel): def voice(self, irc, msg, args, channel):
"""[<channel>] """[<channel>]
The <channel> argument is only necessary if the message isn't being If you have the #channel.voice capability, this will give you voice.
sent in the channel itself. If you have the #channel.voice capability, <channel> is only necessary if the message isn't sent in the channel
this will give you voice. itself.
""" """
if irc.nick in irc.state.channels[channel].ops: if irc.nick in irc.state.channels[channel].ops:
irc.queueMsg(ircmsgs.voice(channel, msg.nick)) irc.queueMsg(ircmsgs.voice(channel, msg.nick))
@ -90,10 +90,10 @@ class Channel(callbacks.Privmsg):
def cycle(self, irc, msg, args, channel): def cycle(self, irc, msg, args, channel):
"""[<channel>] [<key>] """[<channel>] [<key>]
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will cause the bot to
sent in the channel itself. If you have the #channel.op capability, "cycle", or PART and then JOIN the channel. If <key> is given, join
this will cause the bot to "cycle", or PART and then JOIN the channel. the channel using that key. <channel> is only necessary if the message
If <key> is given, join the channel using that key. isn't sent in the channel itself.
""" """
key = privmsgs.getArgs(args, required=0, optional=1) key = privmsgs.getArgs(args, required=0, optional=1)
if not key: if not key:
@ -105,11 +105,11 @@ class Channel(callbacks.Privmsg):
def kban(self, irc, msg, args): def kban(self, irc, msg, args):
"""[<channel>] <nick> [<number of seconds to ban>] """[<channel>] <nick> [<number of seconds to ban>]
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will kickban <nick> for
sent in the channel itself. If you have the #channel.op capability, as many seconds as you specify, or else (if you specify 0 seconds or
this will kickban <nick> for as many seconds as you specify, or else don't specify a number of seconds) it will ban the person indefinitely.
(if you specify 0 seconds or don't specify a number of seconds) it <channel> is only necessary if the message isn't sent in the channel
will ban the person indefinitely. itself.
""" """
channel = privmsgs.getChannel(msg, args) channel = privmsgs.getChannel(msg, args)
(bannedNick, length) = privmsgs.getArgs(args, optional=1) (bannedNick, length) = privmsgs.getArgs(args, optional=1)
@ -160,10 +160,10 @@ class Channel(callbacks.Privmsg):
def lobotomize(self, irc, msg, args, channel): def lobotomize(self, irc, msg, args, channel):
"""[<channel>] """[<channel>]
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will "lobotomize" the
sent in the channel itself. If you have the #channel.op capability, bot, making it silent and unanswering to all requests made in the
this will "lobotomize" the bot, making it silent and unanswering to channel. <channel> is only necessary if the message isn't sent in the
all requests made in the channel. channel itself.
""" """
ircdb.channels.getChannel(channel).lobotomized = True ircdb.channels.getChannel(channel).lobotomized = True
irc.reply(msg, conf.replySuccess) irc.reply(msg, conf.replySuccess)
@ -172,10 +172,10 @@ class Channel(callbacks.Privmsg):
def unlobotomize(self, irc, msg, args, channel): def unlobotomize(self, irc, msg, args, channel):
"""[<channel>] """[<channel>]
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will unlobotomize the bot,
sent in the channel itself. If you have the #channel.op capability, making it respond to requests made in the channel again.
this will unlobotomize the bot, making it respond to requests made in <channel> is only necessary if the message isn't sent in the channel
the channel again. itself.
""" """
ircdb.channels.getChannel(channel).lobotomized = False ircdb.channels.getChannel(channel).lobotomized = False
irc.reply(msg, conf.replySuccess) irc.reply(msg, conf.replySuccess)
@ -184,10 +184,10 @@ class Channel(callbacks.Privmsg):
def permban(self, irc, msg, args, channel): def permban(self, irc, msg, args, channel):
"""[<channel>] <nick|hostmask> """[<channel>] <nick|hostmask>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will effect a permanent
sent in the channel itself. If you have the #channel.op capability, (persistent) ban on the given <hostmask> (or the current hostmask
this will effect a permanent (persistent) ban on the given <hostmask> associated with <nick>. <channel> is only necessary if the message
(or the current hostmask associated with <nick>. isn't sent in the channel itself.
""" """
arg = privmsgs.getArgs(args) arg = privmsgs.getArgs(args)
if ircutils.isNick(arg): if ircutils.isNick(arg):
@ -206,9 +206,9 @@ class Channel(callbacks.Privmsg):
def unpermban(self, irc, msg, args, channel): def unpermban(self, irc, msg, args, channel):
"""[<channel>] <hostmask> """[<channel>] <hostmask>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will remove the permanent
sent in the channel itself. If you have the #channel.op capability, ban on <hostmask>. <channel> is only necessary if the message isn't
this will remove the permanent ban on <hostmask>. sent in the channel itself.
""" """
banmask = privmsgs.getArgs(args) banmask = privmsgs.getArgs(args)
c = ircdb.channels.getChannel(channel) c = ircdb.channels.getChannel(channel)
@ -220,10 +220,10 @@ class Channel(callbacks.Privmsg):
def ignore(self, irc, msg, args, channel): def ignore(self, irc, msg, args, channel):
"""[<channel>] <nick|hostmask> """[<channel>] <nick|hostmask>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will set a permanent
sent in the channel itself. If you have the #channel.op capability, (persistent) ignore on <hostmask> or the hostmask currently associated
this will set a permanent (persistent) ignore on <hostmask> or the with <nick>. <channel> is only necessary if the message isn't sent in
hostmask currently associated with <nick>. the channel itself.
""" """
arg = privmsgs.getArgs(args) arg = privmsgs.getArgs(args)
if ircutils.isNick(arg): if ircutils.isNick(arg):
@ -242,9 +242,9 @@ class Channel(callbacks.Privmsg):
def unignore(self, irc, msg, args, channel): def unignore(self, irc, msg, args, channel):
"""[<channel>] <hostmask> """[<channel>] <hostmask>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will remove the permanent
sent in the channel itself. If you have the #channel.op capability, ignore on <hostmask> in the channel. <channel> is only necessary if the
this will remove the permanent ignore on <hostmask> in the channel. message isn't sent in the channel itself.
""" """
banmask = privmsgs.getArgs(args) banmask = privmsgs.getArgs(args)
c = ircdb.channels.getChannel(channel) c = ircdb.channels.getChannel(channel)
@ -257,8 +257,8 @@ class Channel(callbacks.Privmsg):
"""[<channel>] """[<channel>]
Lists the hostmasks that the bot is ignoring on the given channel. Lists the hostmasks that the bot is ignoring on the given channel.
The <channel> argument is only necessary if the message isn't being <channel> is only necessary if the message isn't sent in the channel
sent in the channel itself. itself.
""" """
channelarg = privmsgs.getArgs(args, required=0, optional=1) channelarg = privmsgs.getArgs(args, required=0, optional=1)
channel = channelarg or channel channel = channelarg or channel
@ -274,10 +274,10 @@ class Channel(callbacks.Privmsg):
def addcapability(self, irc, msg, args, channel): def addcapability(self, irc, msg, args, channel):
"""[<channel>] <name|hostmask> <capability> """[<channel>] <name|hostmask> <capability>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will give the user
sent in the channel itself. If you have the #channel.op capability, currently identified as <name> (or the user to whom <hostmask> maps)
this will give the user currently identified as <name> (or the user the capability <capability> in the channel. <channel> is only necessary
to whom <hostmask> maps) the capability <capability> in the channel. if the message isn't sent in the channel itself.
""" """
(name, capability) = privmsgs.getArgs(args, 2) (name, capability) = privmsgs.getArgs(args, 2)
capability = ircdb.makeChannelCapability(channel, capability) capability = ircdb.makeChannelCapability(channel, capability)
@ -294,11 +294,10 @@ class Channel(callbacks.Privmsg):
def removecapability(self, irc, msg, args, channel): def removecapability(self, irc, msg, args, channel):
"""[<channel>] <name|hostmask> <capability> """[<channel>] <name|hostmask> <capability>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will take from the user
sent in the channel itself. If you have the #channel.op capability, currently identified as <name> (or the user to whom <hostmask> maps)
this will take from the user currently identified as <name> (or the the capability <capability> in the channel. <channel> is only necessary
user to whom <hostmask> maps) the capability <capability> in the if the message isn't sent in the channel itself.
channel.
""" """
(name, capability) = privmsgs.getArgs(args, 2) (name, capability) = privmsgs.getArgs(args, 2)
capability = ircdb.makeChannelCapability(channel, capability) capability = ircdb.makeChannelCapability(channel, capability)
@ -315,10 +314,10 @@ class Channel(callbacks.Privmsg):
def setdefaultcapability(self, irc, msg, args, channel): def setdefaultcapability(self, irc, msg, args, channel):
"""[<channel>] <default response to unknown capabilities> <True|False> """[<channel>] <default response to unknown capabilities> <True|False>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will set the default
sent in the channel itself. If you have the #channel.op capability, response to non-power-related (that is, not {op, halfop, voice}
this will set the default response to non-power-related (that is, capabilities to be the value you give. <channel> is only necessary if
not {op, halfop, voice} capabilities to be the value you give. the message isn't sent in the channel itself.
""" """
v = privmsgs.getArgs(args) v = privmsgs.getArgs(args)
v = v.capitalize() v = v.capitalize()
@ -339,10 +338,9 @@ class Channel(callbacks.Privmsg):
def setcapability(self, irc, msg, args, channel): def setcapability(self, irc, msg, args, channel):
"""[<channel>] <capability> """[<channel>] <capability>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will add the channel
sent in the channel itself. If you have the #channel.op capability, capability <capability> for all users in the channel. <channel> is
this will add the channel capability <capability> for all users in the only necessary if the message isn't sent in the channel itself.
channel.
""" """
capability = privmsgs.getArgs(args) capability = privmsgs.getArgs(args)
c = ircdb.channels.getChannel(channel) c = ircdb.channels.getChannel(channel)
@ -354,11 +352,10 @@ class Channel(callbacks.Privmsg):
def unsetcapability(self, irc, msg, args, channel): def unsetcapability(self, irc, msg, args, channel):
"""[<chanel>] <capability> """[<chanel>] <capability>
The <channel> argument is only necessary if the message isn't being If you have the #channel.op capability, this will unset the channel
sent in the channel itself. If you have the #channel.op capability, capability <capability> so each user's specific capability or the
this will unset the channel capability <capability> so each user's channel default capability will take precedence. <channel> is only
specific capability or the channel default capability will take necessary if the message isn't sent in the channel itself.
precedence.
""" """
capability = privmsgs.getArgs(args) capability = privmsgs.getArgs(args)
c = ircdb.channels.getChannel(channel) c = ircdb.channels.getChannel(channel)
@ -370,9 +367,8 @@ class Channel(callbacks.Privmsg):
def capabilities(self, irc, msg, args): def capabilities(self, irc, msg, args):
"""[<channel>] """[<channel>]
The <channel> argument is only necessary if the message isn't being Returns the capabilities present on the <channel>. <channel> is only
sent in the channel itself. Returns the capabilities present on the necessary if the message isn't sent in the channel itself.
<channel>.
""" """
channel = privmsgs.getChannel(msg, args) channel = privmsgs.getChannel(msg, args)
c = ircdb.channels.getChannel(channel) c = ircdb.channels.getChannel(channel)