summary refs log tree commit diff
path: root/event.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-12-14 16:43:49 -0500
committerJune McEnroe <june@causal.agency>2018-12-14 16:43:49 -0500
commite84c36a0bd255dfa1995c94b30f1c59d7dad7244 (patch)
treec8cc7a9a3d5383bb0b6429eb2c9377c26f4f0477 /event.c
parentAdd uint typedef (diff)
downloadcatgirl-e84c36a0bd255dfa1995c94b30f1c59d7dad7244.tar.gz
catgirl-e84c36a0bd255dfa1995c94b30f1c59d7dad7244.zip
Factor out ircQuit
Diffstat (limited to '')
-rw-r--r--event.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/event.c b/event.c
index a5a49cc..c324a65 100644
--- a/event.c
+++ b/event.c
@@ -131,14 +131,10 @@ noreturn void eventLoop(void) {
 
 	for (;;) {
 		if (sig[SIGCHLD]) childWait();
-		if (sig[SIGHUP]) {
-			ircFmt("QUIT :zzz\r\n");
-			self.quit = true;
-		}
+		if (sig[SIGHUP]) ircQuit("zzz");
 		if (sig[SIGINT]) {
 			signal(SIGINT, SIG_DFL);
-			ircFmt("QUIT :Goodbye\r\n");
-			self.quit = true;
+			ircQuit("Goodbye");
 		}
 		if (sig[SIGWINCH]) {
 			curses.sa_handler(SIGWINCH);