diff options
author | C. McEnroe | 2020-02-05 23:27:43 -0500 |
---|---|---|
committer | C. McEnroe | 2020-02-05 23:27:43 -0500 |
commit | 3085779d86f3ed66bd24eccf1f64ffc1bd71afcd (patch) | |
tree | 29cc9bcf3e11fb22ed1f4f8bbd5621ea526feb23 /handle.c | |
parent | 839cc362a85e3cf463cd0cfe6c092ca0978b8c29 (diff) |
Handle ERROR
Diffstat (limited to 'handle.c')
-rw-r--r-- | handle.c | 6 |
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 }, |