Merge pull request #1161 from jacksonmj/private-user-list

Send User.list response in private
This commit is contained in:
Valentin Lorentz 2015-08-31 15:16:25 +02:00
commit 6d60616597
2 changed files with 6 additions and 4 deletions

View File

@ -43,8 +43,9 @@ def configure(advanced):
User = conf.registerPlugin('User')
# This is where your configuration variables (if any) should go. For example:
# conf.registerGlobalValue(User, 'someConfigVariableName',
# registry.Boolean(False, """Help for someConfigVariableName."""))
conf.registerChannelValue(User, 'listInPrivate',
registry.Boolean(True, _("""Determines whether the output of 'user list'
will be sent in private. This prevents mass-highlights of people who use
their nick as their bot username.""")))
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:

View File

@ -88,7 +88,8 @@ class User(callbacks.Plugin):
users.append(u.name)
if users:
utils.sortBy(str.lower, users)
irc.reply(format('%L', users))
private = self.registryValue("listInPrivate", msg.args[0])
irc.reply(format('%L', users), private=private)
else:
if predicates:
irc.reply(_('There are no matching registered users.'))