From 3085779d86f3ed66bd24eccf1f64ffc1bd71afcd Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Wed, 5 Feb 2020 23:27:43 -0500 Subject: Handle ERROR --- handle.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 }, -- cgit 1.4.1-2-gfad0