update irc.reply() change new arg name

This commit is contained in:
Dan 2015-01-17 03:49:32 -05:00
parent 2fe84a3474
commit bd2d17a1c2

View File

@ -837,22 +837,23 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
cb._callCommand(command, self, self.msg, args)
def reply(self, s, noLengthCheck=False, prefixNick=None, action=None,
private=None, notice=None, to=None, msg=None, usesendMsg=False):
private=None, notice=None, to=None, msg=None, sendImmediately=False):
"""
Keyword arguments:
* `noLengthCheck=False`: True if the length shouldn't be checked
(used for 'more' handling)
* `prefixNick=True`: False if the nick shouldn't be prefixed to the
reply.
* `action=False`: True if the reply should be an action.
* `private=False`: True if the reply should be in private.
* `notice=False`: True if the reply should be noticed when the
bot is configured to do so.
* `to=<nick|channel>`: The nick or channel the reply should go to.
Defaults to msg.args[0] (or msg.nick if private)
* `usesendMsg=False`: True if the reply should be sent
using sendMsg instead of queueMsg
* `noLengthCheck=False`: True if the length shouldn't be checked
(used for 'more' handling)
* `prefixNick=True`: False if the nick shouldn't be prefixed to the
reply.
* `action=False`: True if the reply should be an action.
* `private=False`: True if the reply should be in private.
* `notice=False`: True if the reply should be noticed when the
bot is configured to do so.
* `to=<nick|channel>`: The nick or channel the reply should go to.
Defaults to msg.args[0] (or msg.nick if private)
* `sendImmediately=False`: True if the reply should use sendMsg() which
bypasses conf.supybot.protocols.irc.throttleTime
and gets sent before any queued messages
"""
# These use and or or based on whether or not they default to True or
# False. Those that default to True use and; those that default to
@ -860,7 +861,7 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
assert not isinstance(s, ircmsgs.IrcMsg), \
'Old code alert: there is no longer a "msg" argument to reply.'
self.repliedTo = True
if usesendMsg:
if sendImmediately:
sendMsg = self.irc.sendMsg
else:
sendMsg = self.irc.queueMsg