This commit is contained in:
Jeremy Fincher 2003-12-10 19:17:48 +00:00
parent b7fbaedcad
commit f592aab3c0

View File

@ -430,12 +430,16 @@ class IrcObjectProxy:
if len(s) > allowedLength*50: if len(s) > allowedLength*50:
log.warning('Cowardly refusing to "more" %s bytes.'%len(s)) log.warning('Cowardly refusing to "more" %s bytes.'%len(s))
s = s[:allowedLength*50] s = s[:allowedLength*50]
if len(s) < allowedLength:
self.irc.queueMsg(reply(msg, s, self.prefixName,
self.private,self.notice,self.to))
return
msgs = textwrap.wrap(s, allowedLength-30) # -30 is for "nick:" msgs = textwrap.wrap(s, allowedLength-30) # -30 is for "nick:"
msgs.reverse() msgs.reverse()
response = msgs.pop() response = msgs.pop()
if msgs: if msgs:
response += ' \x02(%s)\x0F' % \ response = ircutils.bold('(%s)')
utils.nItems(len(msgs), 'message', 'more') response %= utils.nItems(len(msgs), 'message', 'more')
mask = msg.prefix.split('!', 1)[1] mask = msg.prefix.split('!', 1)[1]
Privmsg._mores[mask] = msgs Privmsg._mores[mask] = msgs
private = self.private or not ircutils.isChannel(msg.args[0]) private = self.private or not ircutils.isChannel(msg.args[0])