mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Make supybot.reply.oneToOne channel-specific.
This commit is contained in:
parent
19708c55cc
commit
fc9daa9953
@ -439,7 +439,7 @@ class RichReplyMethods(object):
|
||||
return self.reply(s, **kwargs)
|
||||
|
||||
def replies(self, L, prefixer=None, joiner=None,
|
||||
onlyPrefixFirst=False, **kwargs):
|
||||
onlyPrefixFirst=False, to=None, **kwargs):
|
||||
if prefixer is None:
|
||||
prefixer = ''
|
||||
if joiner is None:
|
||||
@ -448,7 +448,11 @@ class RichReplyMethods(object):
|
||||
prefixer = prefixer.__add__
|
||||
if isinstance(joiner, basestring):
|
||||
joiner = joiner.join
|
||||
if conf.supybot.reply.oneToOne():
|
||||
if ircutils.isChannel(to):
|
||||
oneToOne = conf.get(conf.supybot.reply.oneToOne, to)
|
||||
else:
|
||||
oneToOne = conf.supybot.reply.oneToOne()
|
||||
if oneToOne:
|
||||
return self.reply(prefixer(joiner(L)), **kwargs)
|
||||
else:
|
||||
msg = None
|
||||
|
@ -369,7 +369,7 @@ registerChannelValue(supybot.reply.mores, 'instant',
|
||||
they are formed). Defaults to 1, which means that a more command will be
|
||||
required for all but the first chunk.""")))
|
||||
|
||||
registerGlobalValue(supybot.reply, 'oneToOne',
|
||||
registerChannelValue(supybot.reply, 'oneToOne',
|
||||
registry.Boolean(True, _("""Determines whether the bot will send
|
||||
multi-message replies in a single message or in multiple messages. For
|
||||
safety purposes (so the bot is less likely to flood) it will normally send
|
||||
|
Loading…
Reference in New Issue
Block a user