1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 09:50:29 +00:00

Update the final "closing connection" message

Add some more information (nick name, user name, host name) and bring it
in line with some other implementations (at least ircd2.11 and Hybrid).
This commit is contained in:
Alexander Barton 2023-07-18 11:45:01 +02:00
parent 0035e0d778
commit 63ad3b9acd

View File

@ -1055,8 +1055,10 @@ Conn_Close(CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClien
} }
#endif #endif
/* Send ERROR to client (see RFC 2812, section 3.1.7) */ /* Send ERROR to client (see RFC 2812, section 3.1.7) */
if (FwdMsg) if (c)
Conn_WriteStr(Idx, "ERROR :%s", FwdMsg); Conn_WriteStr(Idx, "ERROR :Closing connection: %s[%s@%s] (%s)",
Client_ID(c), Client_User(c), Client_Hostname(c),
FwdMsg ? FwdMsg : "\"\"");
else else
Conn_WriteStr(Idx, "ERROR :Closing connection"); Conn_WriteStr(Idx, "ERROR :Closing connection");
} }