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,7 +837,7 @@ 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:
@ -851,8 +851,9 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
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
* `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