mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
User: allow for custom whoami error
This commit is contained in:
parent
0be4e2c953
commit
0c4f9d74eb
@ -47,5 +47,7 @@ conf.registerChannelValue(User, 'listInPrivate',
|
|||||||
registry.Boolean(True, _("""Determines whether the output of 'user list'
|
registry.Boolean(True, _("""Determines whether the output of 'user list'
|
||||||
will be sent in private. This prevents mass-highlights of people who use
|
will be sent in private. This prevents mass-highlights of people who use
|
||||||
their nick as their bot username.""")))
|
their nick as their bot username.""")))
|
||||||
|
conf.registerGlobalValue(User, 'customWho',
|
||||||
|
registry.NormalizedString(None, _("""Determines what message the bot sends
|
||||||
|
when a user isn't identified or recognized.""")))
|
||||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||||
|
@ -480,7 +480,10 @@ class User(callbacks.Plugin):
|
|||||||
user = ircdb.users.getUser(msg.prefix)
|
user = ircdb.users.getUser(msg.prefix)
|
||||||
irc.reply(user.name)
|
irc.reply(user.name)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
if not self.registryValue('customWho'):
|
||||||
irc.reply(_('I don\'t recognize you. You can message me either of these two commands: "user identify <username> <password>" to log in or "user register <username> <password>" to register.'))
|
irc.reply(_('I don\'t recognize you. You can message me either of these two commands: "user identify <username> <password>" to log in or "user register <username> <password>" to register.'))
|
||||||
|
else:
|
||||||
|
irc.reply(self.registryValue('customWho'))
|
||||||
whoami = wrap(whoami)
|
whoami = wrap(whoami)
|
||||||
|
|
||||||
@internationalizeDocstring
|
@internationalizeDocstring
|
||||||
|
Loading…
Reference in New Issue
Block a user