From b8011ca5ba386aa1e16e8cf255e9e19375151950 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 31 Oct 2019 18:25:01 -0400 Subject: Send clients their own QUIT on shutdown --- bounce.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bounce.c b/bounce.c index 18b205e..b89e90a 100644 --- a/bounce.c +++ b/bounce.c @@ -284,7 +284,10 @@ int main(int argc, char *argv[]) { serverFormat("QUIT :%s\r\n", quit); for (size_t i = 0; i < event.len; ++i) { if (event.clients[i]) { - clientFormat(event.clients[i], "ERROR :Disconnecting\r\n"); + clientFormat( + event.clients[i], ":%s QUIT :%s\r\nERROR :Disconnecting\r\n", + stateEcho(), quit + ); clientFree(event.clients[i]); } close(event.fds[i].fd); -- cgit 1.4.1