Fixed a bugz0r.

This commit is contained in:
Jeremy Fincher 2004-10-26 19:37:03 +00:00
parent 39ab3459de
commit f11e7d19d3

View File

@ -809,6 +809,7 @@ class IrcObjectProxy(RichReplyMethods):
target) target)
if not allowedLength: # 0 indicates this. if not allowedLength: # 0 indicates this.
allowedLength = 450 - len(self.irc.prefix) allowedLength = 450 - len(self.irc.prefix)
allowedLength -= len(msg.nick)
maximumMores = conf.get(conf.supybot.reply.mores.maximum, maximumMores = conf.get(conf.supybot.reply.mores.maximum,
target) target)
maximumLength = allowedLength * maximumMores maximumLength = allowedLength * maximumMores
@ -832,7 +833,7 @@ class IrcObjectProxy(RichReplyMethods):
prefixName=self.prefixName) prefixName=self.prefixName)
self.irc.queueMsg(m) self.irc.queueMsg(m)
return m return m
msgs = ircutils.wrap(s, allowedLength-30) # -30 is for nick: msgs = ircutils.wrap(s, allowedLength)
msgs.reverse() msgs.reverse()
instant = conf.get(conf.supybot.reply.mores.instant,target) instant = conf.get(conf.supybot.reply.mores.instant,target)
while instant > 1 and msgs: while instant > 1 and msgs: