diff options
author | June McEnroe <june@causal.agency> | 2020-02-27 02:48:24 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-27 02:48:24 -0500 |
commit | 6f9c7cc607ce42ce1c6e893b34dc14cd4eaa396e (patch) | |
tree | 3d71a3080b70f21abdad89b2ceaf04f2747c05c0 | |
parent | Support CAP LS 302 from clients (diff) | |
download | pounce-6f9c7cc607ce42ce1c6e893b34dc14cd4eaa396e.tar.gz pounce-6f9c7cc607ce42ce1c6e893b34dc14cd4eaa396e.zip |
Properly treat CAP LS version as a number
-rw-r--r-- | client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client.c b/client.c index f66ea0e..92ca632 100644 --- a/client.c +++ b/client.c @@ -176,7 +176,9 @@ static void handleCap(struct Client *client, struct Message *msg) { } else if (!strcmp(msg->params[0], "LS")) { if (client->need) client->need |= NeedCapEnd; - if (msg->params[1] && !strcmp(msg->params[1], "302")) { + int version = 0; + if (msg->params[1]) version = strtol(msg->params[1], NULL, 10); + if (version >= 302) { if (avail & CapCapNotify) client->caps |= CapCapNotify; clientFormat( client, ":%s CAP * LS :%s\r\n", |