]> PatchyGit - patchyircd.git/commitdiff
disable cap command
authorEgor <egor@patchysicp.xyz>
Wed, 4 May 2022 08:40:28 +0000 (11:40 +0300)
committerEgor <egor@patchysicp.xyz>
Wed, 4 May 2022 08:40:28 +0000 (11:40 +0300)
irc.c

diff --git a/irc.c b/irc.c
index 1a2f059..497409a 100644 (file)
--- a/irc.c
+++ b/irc.c
@@ -87,12 +87,16 @@ int processPacket(struct client_data *client) {
                if (!args[0]) // FIXME: error message
                        return 0;
                stringupper(args[0]);
+               // don't enable CAP command until we actually have CAPs
+               // because clients can't handle NAKs
+#if 0
                if (strcmp(args[0], "LS") == 0) {
                        // at least one client hangs if it doesn't see a known extension
                        copy_strf(&databuf, ":%s CAP * LS :multi-prefix\n", hostname);
                        send_log(client->FD, databuf.buf, databuf.len, 0);
                        if (client->regstate != REG_CAPEND || !client->nick || !client->username)
                                client->regstate = REG_CAPLS;
+
                } else if (strcmp(args[0], "LIST") == 0) {
                        copy_strf(&databuf, ":%s CAP * LIST :\n", hostname);
                        send_log(client->FD, databuf.buf, databuf.len, 0);
@@ -107,6 +111,7 @@ int processPacket(struct client_data *client) {
                } else {
                        goto unknown;
                }
+#endif
        } else if(strcmp(command, "NICK") == 0) {
                // User now registered
                if (!args[0]) // FIXME: error message