summary refs log tree commit diff
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--event.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/event.c b/event.c
index 4ea9f81..a5a49cc 100644
--- a/event.c
+++ b/event.c
@@ -131,10 +131,14 @@ noreturn void eventLoop(void) {
 
 	for (;;) {
 		if (sig[SIGCHLD]) childWait();
-		if (sig[SIGHUP]) ircFmt("QUIT :zzz\r\n");
+		if (sig[SIGHUP]) {
+			ircFmt("QUIT :zzz\r\n");
+			self.quit = true;
+		}
 		if (sig[SIGINT]) {
 			signal(SIGINT, SIG_DFL);
 			ircFmt("QUIT :Goodbye\r\n");
+			self.quit = true;
 		}
 		if (sig[SIGWINCH]) {
 			curses.sa_handler(SIGWINCH);