summary refs log tree commit diff
path: root/litterbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'litterbox.c')
-rw-r--r--litterbox.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/litterbox.c b/litterbox.c
index 2a156b1..3a54bf5 100644
--- a/litterbox.c
+++ b/litterbox.c
@@ -436,6 +436,13 @@ static void handlePing(struct Message *msg) {
 	format("PONG :%s\r\n", msg->params[0]);
 }
 
+static void handleError(struct Message *msg) {
+	require(msg, false, 1);
+	tls_close(client);
+	dbClose();
+	errx(EX_UNAVAILABLE, "%s", msg->params[0]);
+}
+
 static const struct {
 	const char *cmd;
 	bool transaction;
@@ -450,6 +457,7 @@ static const struct {
 	{ "375", false, handleReplyMOTDStart },
 	{ "376", true, handleReplyEndOfMOTD },
 	{ "CAP", false, handleCap },
+	{ "ERROR", false, handleError },
 	{ "JOIN", true, handleJoin },
 	{ "KICK", true, handleKick },
 	{ "NICK", true, handleNick },
2019-12-20Respect mailmap in gl pretty formatJune McEnroe 2019-12-20Set LANG in cgit filtersJune McEnroe 2019-12-20Source .editrc before applying -v or -eJune McEnroe 2019-12-20Disable signing commitsJune McEnroe 2019-12-19Ignore about-filterJune McEnroe 2019-12-19Fix matching make tags with no sourcesJune McEnroe 2019-12-19Avoid matching := assignments as tagsJune McEnroe 2019-12-18Hide line numbers when rendering mdocJune McEnroe 2019-12-18Customize cgit CSSJune McEnroe 2019-12-18Use :target rather than :focus pseudo-classJune McEnroe 2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe 2019-12-18Add git.causal.agency cgit configJune McEnroe 2019-12-18Bail from hi if input is binaryJune McEnroe 2019-12-16Post "cgit setup"June McEnroe