diff options
author | June McEnroe <june@causal.agency> | 2021-01-24 00:49:53 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-01-24 12:59:15 -0500 |
commit | 3b1c1b835c6439507b68d7666df61fa96e61095c (patch) | |
tree | d5e64d09827726188ba103d3407876664a5655b3 /state.c | |
parent | Add -o and -t options to trust self-signed certificates (diff) | |
download | pounce-3b1c1b835c6439507b68d7666df61fa96e61095c.tar.gz pounce-3b1c1b835c6439507b68d7666df61fa96e61095c.zip |
Support echo-message capability
Only request it with labeled-response, since it is impossible to correlate messages to clients without. For clients without echo-message, synthesize a label on PRIVMSG/NOTICE/TAGMSG, then filter out received messages with that label.
Diffstat (limited to 'state.c')
-rw-r--r-- | state.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/state.c b/state.c index 41ffdd0..6b26589 100644 --- a/state.c +++ b/state.c @@ -90,6 +90,9 @@ static void handleCap(struct Message *msg) { if (!strcmp(msg->params[1], "LS") || !strcmp(msg->params[1], "NEW")) { caps &= ~(CapSASL | CapSTS | CapUnsupported); + if (caps & CapEchoMessage && !(caps & CapLabeledResponse)) { + caps &= ~CapEchoMessage; + } if (caps) { serverFormat("CAP REQ :%s\r\n", capList(caps, NULL)); } else { |