From a6c37817668f5b0e1d2cce3ee949470a0a440bfe Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 16 Jul 2023 21:23:33 -0400 Subject: Implement draft/read-marker --- state.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'state.c') diff --git a/state.c b/state.c index 924bb8f..a28b3ba 100644 --- a/state.c +++ b/state.c @@ -53,12 +53,6 @@ static void require(const struct Message *msg, bool origin, size_t len) { } } -static void set(char **field, const char *value) { - if (*field) free(*field); - *field = strdup(value); - if (!*field) err(EX_OSERR, "strdup"); -} - // Maximum size of one AUTHENTICATE message. enum { AuthLen = 299 }; static char plainBase64[BASE64_SIZE(AuthLen)]; @@ -90,6 +84,7 @@ static const enum Cap DontReq = 0 | CapConsumer | CapPalaverApp | CapPassive + | CapReadMarker | CapSASL | CapSTS | CapUnsupported; @@ -475,6 +470,9 @@ void stateSync(struct Client *client) { clientOrigin, self.nick, chan->name, chan->topic ); } + if (client->caps & CapReadMarker) { + clientGetMarker(client, chan->name); + } if (stateNoNames) continue; serverEnqueue("NAMES %s\r\n", chan->name); } -- cgit 1.4.1