mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Added supybot.reply.maximumLength.
This commit is contained in:
parent
3740c74aa9
commit
72214dc9d0
@ -721,6 +721,9 @@ class IrcObjectProxy(RichReplyMethods):
|
||||
if self.finalEvaled:
|
||||
try:
|
||||
if not isinstance(self.irc, irclib.Irc):
|
||||
s = s[:conf.supybot.reply.maximumLength()]
|
||||
if conf.get(supybot.reply.truncate, self.msg.args[0]):
|
||||
s = s[:512]
|
||||
self.irc.reply(s, to=self.to,
|
||||
notice=self.notice,
|
||||
action=self.action,
|
||||
|
@ -261,6 +261,10 @@ registerGlobalValue(supybot, 'channels',
|
||||
###
|
||||
registerGroup(supybot, 'reply')
|
||||
|
||||
registerGlobalValue(supybot.reply, 'maximumLength',
|
||||
registry.Integer(512*256, """Determines the absolute maximum length of the
|
||||
bot's reply -- no reply will passed through the bot greater than this."""))
|
||||
|
||||
registerChannelValue(supybot.reply, 'truncate',
|
||||
registry.Boolean(False, """Determines whether the bot will simply truncate
|
||||
messages instead of breaking up long messages and using the 'more' command
|
||||
|
Loading…
Reference in New Issue
Block a user