mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-12 13:12:35 +01:00
irclib: Remove special-casing of the last instant message in _sendReply
There is no reason for it to be special; and this special-casing would be annoying when we add support for outgoing multiline batches.
This commit is contained in:
parent
de29218bdb
commit
d5d22985f5
@ -1045,7 +1045,7 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
|||||||
chunk = '%s %s' % (chunk, n)
|
chunk = '%s %s' % (chunk, n)
|
||||||
msgs.append(_makeReply(self, msg, chunk, **replyArgs))
|
msgs.append(_makeReply(self, msg, chunk, **replyArgs))
|
||||||
|
|
||||||
while instant > 1 and msgs:
|
while instant > 0 and msgs:
|
||||||
instant -= 1
|
instant -= 1
|
||||||
response = msgs.pop()
|
response = msgs.pop()
|
||||||
sendMsg(response)
|
sendMsg(response)
|
||||||
@ -1056,7 +1056,6 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
|||||||
# return m
|
# return m
|
||||||
if not msgs:
|
if not msgs:
|
||||||
return
|
return
|
||||||
response = msgs.pop()
|
|
||||||
prefix = msg.prefix
|
prefix = msg.prefix
|
||||||
if self.to and ircutils.isNick(self.to):
|
if self.to and ircutils.isNick(self.to):
|
||||||
try:
|
try:
|
||||||
@ -1069,7 +1068,6 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
|||||||
public = bool(self.msg.channel)
|
public = bool(self.msg.channel)
|
||||||
private = self.private or not public
|
private = self.private or not public
|
||||||
self._mores[msg.nick] = (private, msgs)
|
self._mores[msg.nick] = (private, msgs)
|
||||||
sendMsg(response)
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def noReply(self, msg=None):
|
def noReply(self, msg=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user