Added supybot.reply.truncate, to turn off the normal moring of things.

This commit is contained in:
Jeremy Fincher 2004-04-05 16:01:36 +00:00
parent 77e6aa7453
commit 6cddfb5358
3 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,6 @@
* Added supybot.reply.truncate, to turn off the normal more'ing
of replies.
* Added supybot.plugins.Enforcer.takeRevengeOnOps, which makes * Added supybot.plugins.Enforcer.takeRevengeOnOps, which makes
the bot even take revenge on #channel,ops who try to violate the the bot even take revenge on #channel,ops who try to violate the
channel configuration. Of course, such people can change the channel configuration. Of course, such people can change the

View File

@ -570,7 +570,8 @@ class IrcObjectProxy(RichReplyMethods):
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: if len(s) < allowedLength or conf.supybot.reply.truncate():
s = s[:allowedLength+20] # In case we're truncating.
self.irc.queueMsg(reply(msg, s, self.prefixName, self.irc.queueMsg(reply(msg, s, self.prefixName,
self.private,self.notice,self.to)) self.private,self.notice,self.to))
self.finished = True self.finished = True

View File

@ -190,6 +190,10 @@ dynamically (though sometimes that doesn't work, hence this variable)."""))
# Reply/error tweaking. # Reply/error tweaking.
### ###
supybot.register('reply') supybot.register('reply')
supybot.reply.register('truncate', registry.Boolean(False, """Determines
whether the bot will simply truncate messages instead of breaking up long
messages and using the 'more' command to get the remaining chunks."""))
supybot.reply.register('oneToOne', registry.Boolean(True, """Determines whether supybot.reply.register('oneToOne', registry.Boolean(True, """Determines whether
the bot will send multi-message replies in a single messsage or in multiple the bot will send multi-message replies in a single messsage or in multiple
messages. For safety purposes (so the bot can't possibly flood) it will messages. For safety purposes (so the bot can't possibly flood) it will