mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Channel: prevent mass-highlights with 'nicks' by defaulting the output to private
This adds a new config variable plugins.Channel.nicksInPrivate. Cherry-picked from commit GLolol@2cc9e9d.
This commit is contained in:
parent
681bd5d85d
commit
c06ed45983
@ -47,6 +47,10 @@ Channel = conf.registerPlugin('Channel')
|
||||
conf.registerChannelValue(Channel, 'alwaysRejoin',
|
||||
registry.Boolean(True, _("""Determines whether the bot will always try to
|
||||
rejoin a channel whenever it's kicked from the channel.""")))
|
||||
conf.registerChannelValue(Channel, 'nicksInPrivate',
|
||||
registry.Boolean(True, _("""Determines whether the output of 'nicks' will
|
||||
be sent in private. This prevents mass-highlights of a channel's users,
|
||||
accidental or on purpose.""")))
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||
|
@ -910,7 +910,8 @@ class Channel(callbacks.Plugin):
|
||||
keys = [option for (option, arg) in optlist]
|
||||
if 'count' not in keys:
|
||||
utils.sortBy(str.lower, L)
|
||||
irc.reply(utils.str.commaAndify(L))
|
||||
private = self.registryValue("nicksInPrivate", channel)
|
||||
irc.reply(utils.str.commaAndify(L), private=private)
|
||||
else:
|
||||
irc.reply(str(len(L)))
|
||||
nicks = wrap(nicks, ['inChannel',
|
||||
|
Loading…
Reference in New Issue
Block a user