diff options
author | June McEnroe <june@causal.agency> | 2020-02-05 23:27:43 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-05 23:27:43 -0500 |
commit | 3085779d86f3ed66bd24eccf1f64ffc1bd71afcd (patch) | |
tree | 29cc9bcf3e11fb22ed1f4f8bbd5621ea526feb23 | |
parent | Handle errors from getopt (diff) | |
download | catgirl-3085779d86f3ed66bd24eccf1f64ffc1bd71afcd.tar.gz catgirl-3085779d86f3ed66bd24eccf1f64ffc1bd71afcd.zip |
Handle ERROR
Diffstat (limited to '')
-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 }, |