summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-31 18:25:01 -0400
committerJune McEnroe <june@causal.agency>2019-10-31 18:25:01 -0400
commitb8011ca5ba386aa1e16e8cf255e9e19375151950 (patch)
treecdc517b8c55e7012590c9cee51977dd91fabc4c8
parentShrink client buffer size (diff)
downloadpounce-b8011ca5ba386aa1e16e8cf255e9e19375151950.tar.gz
pounce-b8011ca5ba386aa1e16e8cf255e9e19375151950.zip
Send clients their own QUIT on shutdown
-rw-r--r--bounce.c5
1 files changed, 4 insertions, 1 deletions
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);
onPřemysl Janouch 2014-01-08Fix about-formatting.shPřemysl Janouch 2014-01-08Fix some spelling errorsPřemysl Janouch 2014-01-08filters: highlight.sh: add css comments for highlight 2.6 and 3.8Ferry Huberts