about summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/handle.c b/handle.c
index 85783d7..89ebcb2 100644
--- a/handle.c
+++ b/handle.c
@@ -233,6 +233,11 @@ static void handlePing(struct Message *msg) {
 	ircFormat("PONG :%s\r\n", msg->params[0]);
 }
 
+static void handleError(struct Message *msg) {
+	require(msg, false, 1);
+	errx(EX_UNAVAILABLE, "%s", msg->params[0]);
+}
+
 static const struct Handler {
 	const char *cmd;
 	Handler *fn;
@@ -248,6 +253,7 @@ static const struct Handler {
 	{ "906", handleErrorSASLFail },
 	{ "AUTHENTICATE", handleAuthenticate },
 	{ "CAP", handleCap },
+	{ "ERROR", handleError },
 	{ "JOIN", handleJoin },
 	{ "NOTICE", handlePrivmsg },
 	{ "PING", handlePing },