From: Egor Date: Fri, 27 Oct 2023 21:19:33 +0000 (+0300) Subject: echo CHGHOST, SETNAME, ACCOUNT X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=749e9629003d0214d5a09261a09632bf5055e54c;p=patchyircd.git echo CHGHOST, SETNAME, ACCOUNT --- diff --git a/src/irc.c b/src/irc.c index 83ee3fc..72e02fb 100644 --- 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)