From f2ac57eb8abd1a70c99b9979bcea516b253a429a Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 23 Jul 2004 04:50:32 +0000 Subject: [PATCH] Fixed the problem with prefixing the nick in private messages. --- src/callbacks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/callbacks.py b/src/callbacks.py index f2d4d18e1..db9c80d68 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -123,8 +123,6 @@ def canonicalName(command): def reply(msg, s, prefixName=True, private=False, notice=False, to=None, action=False): - # This is so we don't prefix a channel name. - # Ok, let's make the target: target = ircutils.replyTo(msg) if private: @@ -139,8 +137,9 @@ def reply(msg, s, prefixName=True, private=False, if not s: s = 'Error: I tried to send you an empty message.' # Let's may sure we don't do, "#channel: foo.". - if prefixName and not ircutils.isChannel(to): - s = '%s: %s' % (to, s) + if prefixName and ircutils.isChannel(target): + if not ircutils.isChannel(to): + s = '%s: %s' % (to, s) # And now, let's decide whether it's a PRIVMSG or a NOTICE. msgmaker = ircmsgs.privmsg if notice: