diff options
author | June McEnroe <june@causal.agency> | 2019-10-31 18:25:01 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-10-31 18:25:01 -0400 |
commit | b8011ca5ba386aa1e16e8cf255e9e19375151950 (patch) | |
tree | cdc517b8c55e7012590c9cee51977dd91fabc4c8 /bounce.c | |
parent | Shrink client buffer size (diff) | |
download | pounce-b8011ca5ba386aa1e16e8cf255e9e19375151950.tar.gz pounce-b8011ca5ba386aa1e16e8cf255e9e19375151950.zip |
Send clients their own QUIT on shutdown
Diffstat (limited to '')
-rw-r--r-- | bounce.c | 5 |
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); |