mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-15 07:04:53 +01:00
Merge pull request #1042 from GLolol/channel/nicksinprivate
Channel: prevent mass-highlights with 'nicks' by defaulting the output to private
This commit is contained in:
commit
248bc65d44
@ -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