Added supybot.reply.withNoticeWhenPrivate.

This commit is contained in:
Jeremy Fincher 2004-07-26 15:51:01 +00:00
parent 377c443405
commit 1b5e3b82f8
3 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,9 @@
* Added supybot.reply.withNoticeWhenPrivate, to make the bot
reply with a notice when it privately messages a user -- this
generally means that the user's client won't open a query window,
which may be nice. Do note that users can override this setting
via the user registry variable of the same name.
* Added supybot.nick.alternates, which allows a list of alternate
nicks to try, in order, if the primary nick (supybot.nick) is
taken. Also added a nick-perturbation function that will change

View File

@ -131,6 +131,9 @@ def reply(msg, s, prefixName=True, private=False,
target = to
else:
target = msg.nick
# XXX: User value.
if conf.supybot.reply.withNoticeWhenPrivate():
notice = True
if to is None:
to = msg.nick
# Ok, now let's make the payload:

View File

@ -345,6 +345,13 @@ registerChannelValue(supybot.reply, 'withPrivateNotice',
Private notices are particularly nice because they don't generally cause
IRC clients to open a new query window."""))
# XXX: User value.
registerGlobalValue(supybot.reply, 'withNoticeWhenPrivate',
registry.Boolean(False, """Determines whether the bot will reply with a
notice when it is sending a private message, in order not to open a /query
window in clients. This can be overridden by individual users via the user
configuration variable reply.withNoticeWhenPrivate."""))
registerChannelValue(supybot.reply, 'withNickPrefix',
registry.Boolean(True, """Determines whether the bot will always prefix the
user's nick to its reply to that user's command."""))