]> PatchyGit - patchyircd.git/commitdiff
echo CHGHOST, SETNAME, ACCOUNT
authorEgor <egor@patchysicp.xyz>
Fri, 27 Oct 2023 21:19:33 +0000 (00:19 +0300)
committerEgor <egor@patchysicp.xyz>
Fri, 27 Oct 2023 21:19:33 +0000 (00:19 +0300)
src/irc.c

index 83ee3fc..72e02fb 100644 (file)
--- a/src/irc.c
+++ b/src/irc.c
@@ -1150,6 +1150,8 @@ int processPacket(struct client_data *client, char *source, char *command, int a
                msg_setname(client);
                int cookie = sendbuf_visible_caps(client, CAP_SETNAME, 0);
                sendbuf_monitor(client->key, cookie, CAP_SETNAME|CAP_EXTENDEDMONITOR, 0);
+               if (client->cookie != cookie)
+                       sendbuf(client);
 #ifdef HAS_LUA
        } else if(strcmp(command, "LUA") == 0) {
                if (argc < 1)
@@ -1325,6 +1327,8 @@ void client_chghost(struct client_data *client, const char *newusername, const c
        msg_chghost(client, newusername, newhostname);
        int cookie = sendbuf_visible_caps(client, CAP_CHGHOST, 0);
        sendbuf_monitor(client->key, cookie, CAP_CHGHOST|CAP_EXTENDEDMONITOR, 0);
+       if (client->cookie != cookie)
+               sendbuf(client);
        int changedacc = client->username[0] != '~' || newusername[0] != '~';
        free(client->username);
        client->username = mystrdup(newusername);
@@ -1349,6 +1353,8 @@ void client_chghost(struct client_data *client, const char *newusername, const c
                msg_account(client);
                int cookie = sendbuf_visible_caps(client, CAP_ACCOUNTNOTIFY, 0);
                sendbuf_monitor(client->key, cookie, CAP_ACCOUNTNOTIFY|CAP_EXTENDEDMONITOR, 0);
+               if (client->cookie != cookie)
+                       sendbuf(client);
        }
 }
 void channel_sendtopic(struct client_data *client, struct channel *chan, int joining)