Trying fix for lack of prefixing name.

This commit is contained in:
Jeremy Fincher 2004-06-23 13:55:40 +00:00
parent fefe1f2806
commit b594ef798a

View File

@ -124,6 +124,9 @@ 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.
if prefixName and not any(ircutils.isChannel, [target, to]):
s = '%s: %s' % (to, s)
# Ok, let's make the target:
target = ircutils.replyTo(msg)
if private:
@ -137,8 +140,6 @@ def reply(msg, s, prefixName=True, private=False,
s = ircutils.safeArgument(s)
if not s:
s = 'Error: I tried to send you an empty message.'
if prefixName and not any(ircutils.isChannel, [target, to]):
s = '%s: %s' % (to, s)
# And now, let's decide whether it's a PRIVMSG or a NOTICE.
msgmaker = ircmsgs.privmsg
if notice: