diff --git a/ChangeLog b/ChangeLog index d62f14014..a3aecd3de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ + * Added supybot.reply.truncate, to turn off the normal more'ing + of replies. + * Added supybot.plugins.Enforcer.takeRevengeOnOps, which makes the bot even take revenge on #channel,ops who try to violate the channel configuration. Of course, such people can change the diff --git a/src/callbacks.py b/src/callbacks.py index 9887f1fcd..cf8f477a4 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -570,7 +570,8 @@ class IrcObjectProxy(RichReplyMethods): if len(s) > allowedLength*50: log.warning('Cowardly refusing to "more" %s bytes.'%len(s)) 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.private,self.notice,self.to)) self.finished = True diff --git a/src/conf.py b/src/conf.py index e3189fea6..b93f85d15 100644 --- a/src/conf.py +++ b/src/conf.py @@ -190,6 +190,10 @@ dynamically (though sometimes that doesn't work, hence this variable).""")) # Reply/error tweaking. ### 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 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