diff --git a/ChangeLog b/ChangeLog index 3f948c3ad..44e05e303 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/callbacks.py b/src/callbacks.py index 4702d3bb9..7ecaa7c31 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -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: diff --git a/src/conf.py b/src/conf.py index c1e26374b..442bfa4a6 100644 --- a/src/conf.py +++ b/src/conf.py @@ -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."""))