Originally Posted By: jaytea
a well constructed IRC server should not be sending you PRIVMSGs intended for other clients (ie. the target should either be a channel or your own nickname: $me), so mIRC's behaviour does not seem unreasonable.


Colloquially, I'm sending a message to the network that I didn't know about. So I want to inform mIRC of that fact.

My interface program, a "middle man" program, sends:

PRIVMSG nick222 :message

to the network. It also sends:

:nick111 PRIVMSG nick222 :message

to the program I'm connecting with, the non-network end, mIRC. I advance mIRC should display "<nick111> message" in the query window with nick222.

There is a security issue, that you might not notice a MITM attack, since the forged message will be not just absent but displayed as authentic.

I noticed the anomaly isn't present in messages to a channel, only individuals. Forged messages to a channel are displayed correctly as from the user's nick.

If mIRC can accomplish this with a script, such as on TEXT as you suggested, it would be satisfactory. I hadn't pursued it at time of writing.

The logic would be something like this:

Code:
On receiving PRIVMSG {
  If recipient is a channel {
    ... normal logic ...
  } Else {
    If sender == self {
      display in (new) query window with recipient:
        <self> message
    } Else If recipient == self {
      display in (new) query window with sender:
        <sender> message
    } else {
      disregard.
    }
  }
}

I observed that PRIVMSGs to channels to which there is no window open are correctly discarded. The "corner case" of that situation is that QUIT messages from users who are not in any channels to which there *is* an open window, are routed to the Status window. According to the above logic, they would be discarded as well, which I moderately agree with but not strongly.

Thanks sincerely.