From: Egor Date: Thu, 19 Oct 2023 09:15:34 +0000 (+0300) Subject: give a different hostname for localhost connections X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=7a71ed6dd8cd0e2dbbda1a70a4d07554b35b975e;p=patchyircd.git give a different hostname for localhost connections --- diff --git a/irc.c b/irc.c index 0ccd815..17c367d 100644 --- a/irc.c +++ b/irc.c @@ -292,7 +292,7 @@ int processPacket(struct client_data *client, char *source, char *command, int a client->realname = mystrdup(args[3]); if (!client->realname) abort(); - client->hostname = mystrdup(hostname); + client->hostname = mystrdup(!strcmp(client->peername, "127.0.0.1") ? "localhost" : hostname); if (!client->hostname) abort(); // Send welcome