mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Added supybot.reply.truncate, to turn off the normal moring of things.
This commit is contained in:
parent
77e6aa7453
commit
6cddfb5358
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user