From 749e9629003d0214d5a09261a09632bf5055e54c Mon Sep 17 00:00:00 2001 From: Egor Date: Sat, 28 Oct 2023 00:19:33 +0300 Subject: [PATCH] echo CHGHOST, SETNAME, ACCOUNT --- src/irc.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.56.0