diff --git a/src/callbacks.py b/src/callbacks.py index 32a076035..63a56bf53 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -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: