Handled reply.withNoticeWhenPrivate appropriately.

This commit is contained in:
Jeremy Fincher 2004-08-31 14:54:37 +00:00
parent 65c739d706
commit 7ef00a2c6a
1 changed files with 3 additions and 5 deletions

View File

@ -161,11 +161,6 @@ def reply(msg, s, prefixName=True, private=None,
target = msg.nick
else:
target = to
# XXX: User value for reply.withNoticeWhenPrivate.
if conf.supybot.reply.withNoticeWhenPrivate(): # global, no getConfig.
if not ircutils.isChannel(target):
# to=channel, private=True (see RSS for an example)
notice = True
if to is None:
to = msg.nick
# Ok, now let's make the payload:
@ -176,6 +171,9 @@ def reply(msg, s, prefixName=True, private=None,
# Let's may sure we don't do, "#channel: foo.".
if not ircutils.isChannel(to):
s = '%s: %s' % (to, s)
if not ircutils.isChannel(target):
if conf.supybot.reply.withNoticeWhenPrivate():
notice = True
# And now, let's decide whether it's a PRIVMSG or a NOTICE.
msgmaker = ircmsgs.privmsg
if notice: