summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-26 14:20:09 -0500
committerJune McEnroe <june@causal.agency>2019-12-26 14:20:09 -0500
commitb3ad8920fcdfa3af72e0e535ae798955e536539b (patch)
treeb8fdfb2ace74f3672cc0c54b10021a377ee9dccd
parentMake sure context exists in handleReplyTopic (diff)
downloadlitterbox-b3ad8920fcdfa3af72e0e535ae798955e536539b.tar.gz
litterbox-b3ad8920fcdfa3af72e0e535ae798955e536539b.zip
Handle ERROR
Diffstat (limited to '')
-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 },
h=1.3.0&id=b5a3a2049648415e86d518a8bf2229b3e463b10f&follow=1'>Add head-include configuration option.Mark Lodato 2009-03-15CGIT 0.8.2.1Lars Hjemli 2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli 2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli 2009-03-15fix segfault when displaying empty blobsEric Wong 2009-02-19Add support for HEAD requestsLars Hjemli 2009-02-19Add support for ETag in 'plain' viewLars Hjemli 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli 2009-02-12Makefile: add doc-related targetsLars Hjemli