diff options
Diffstat (limited to '')
-rw-r--r-- | litterbox.c | 8 |
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 }, |