Add support for self messages
authorShane Synan <digitalcircuit36939@gmail.com>
Sat, 27 Aug 2016 22:28:36 +0000 (17:28 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 5 Sep 2016 17:30:41 +0000 (19:30 +0200)
commitfa2e185ecffa83feca93577a2f8348d554e61f96
tree5e38872a6c4534a264f35b28b491ffaba0d7cc2a
parent3966090a1e7093c417560f7ee13ab310215d9ccd
Add support for self messages

Check if the incoming message sender is our own nick.  If so, treat
as if sent by the core itself.  Message decryption is still tried in
case the user manually set up identical keys on different clients,
but key negotiation isn't allowed with self-messages (for it wouldn't
make sense).

Carry over the "Self" flag from EventManager to Message, so incoming
self-messages can be processed and stored as if sent by the client.

This lays some of the groundwork for IRCv3 'echo-message'.

For example, if the core's nick is 'quasseluser':
  :quasseluser!ex@example.com PRIVMSG dcircuit :hi

...is handled as if 'quasseluser' had sent 'hi' to nick 'dcircuit'.

See http://ircv3.net/specs/extensions/echo-message-3.2.html
src/core/ctcpparser.cpp
src/core/ircparser.cpp