summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-04-03 17:14:28 -0400
committerJune McEnroe <june@causal.agency>2022-04-03 17:15:56 -0400
commit7d2303dca9ce1eba6f3fc7cbe6e418b78c5aa1c1 (patch)
tree8a274ae9213064849c63410007e754c596c925b4 /bounce.c
parentRename client->error to client->remove (diff)
downloadpounce-7d2303dca9ce1eba6f3fc7cbe6e418b78c5aa1c1.tar.gz
pounce-7d2303dca9ce1eba6f3fc7cbe6e418b78c5aa1c1.zip
Allow quitting pounce from clients
Diffstat (limited to 'bounce.c')
-rw-r--r--bounce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bounce.c b/bounce.c
index cd4898a..4146c0e 100644
--- a/bounce.c
+++ b/bounce.c
@@ -441,7 +441,7 @@ int main(int argc, char *argv[]) {
 			}
 		}
 
-		if (signals[SIGINT] || signals[SIGTERM]) {
+		if (clientQuit || signals[SIGINT] || signals[SIGTERM]) {
 			break;
 		}
 		if (signals[SIGALRM]) {
@@ -458,6 +458,7 @@ int main(int argc, char *argv[]) {
 		}
 	}
 
+	if (clientQuit && clientQuit[0]) quit = clientQuit;
 	serverFormat("QUIT :%s\r\n", quit);
 	serverClose();
 	for (size_t i = clientIndex; i < event.len; ++i) {
title='2019-11-08 18:16:42 -0500'>2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe 2019-11-08Only change AWAY status for registered clientsJune McEnroe 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe