]> PatchyGit - patchyircd.git/commitdiff
add RPL_VISIBLEHOST
authorEgor <egor@patchysicp.xyz>
Fri, 27 Oct 2023 21:27:09 +0000 (00:27 +0300)
committerEgor <egor@patchysicp.xyz>
Fri, 27 Oct 2023 21:27:09 +0000 (00:27 +0300)
src/irc.c
src/ircfmt.c
src/ircfmt.h

index 72e02fb..258478e 100644 (file)
--- a/src/irc.c
+++ b/src/irc.c
@@ -1329,6 +1329,7 @@ void client_chghost(struct client_data *client, const char *newusername, const c
        sendbuf_monitor(client->key, cookie, CAP_CHGHOST|CAP_EXTENDEDMONITOR, 0);
        if (client->cookie != cookie)
                sendbuf(client);
+       rpl_visiblehost(client), sendbuf(client);
        int changedacc = client->username[0] != '~' || newusername[0] != '~';
        free(client->username);
        client->username = mystrdup(newusername);
index 5a1457d..9a8aed7 100644 (file)
@@ -532,6 +532,10 @@ void rpl_time(struct client_data *client, time_t ts) // 391
        buf[24] = '\0';
        copy_strf(&databuf, ":%s 391 %s %s :%s\r\n", hostname, client->nick, ts, buf);
 }
+void rpl_visiblehost(struct client_data *client) // 396
+{
+       copy_strf(&databuf, ":%s 396 %s %s@%s :is now you visible host\r\n", hostname, client->nick, client->username, client->hostname);
+}
 #if 0
 void err_unknownerror(struct client_data *client, const char *command, const char *msg) // 400
 {
index 2b0f285..0163421 100644 (file)
@@ -95,6 +95,7 @@ void rpl_whoismodes(struct client_data *client, struct client_data *cl); // 379
 void rpl_youreoper(struct client_data *client); // 381
 // 382 RPL_REHASHING
 void rpl_time(struct client_data *client, time_t ts); // 391
+void rpl_visiblehost(struct client_data *client); // 396
 void err_unknownerror(struct client_data *client, const char *command, const char *msg); // 400
 void err_nosuchnick(struct client_data *client, const char *nick); // 401
 void err_nosuchserver(struct client_data *client, const char *server); // 402