From 9609723dc641957d10ecc9fa725743b1dc71644c Mon Sep 17 00:00:00 2001
From: C. McEnroe
Date: Thu, 20 Feb 2020 05:04:58 -0500
Subject: Handle ERR_CHANOPRIVSNEEDED

---
 handle.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/handle.c b/handle.c
index d268d14..f49ed3b 100644
--- a/handle.c
+++ b/handle.c
@@ -553,6 +553,14 @@ static void handleMode(struct Message *msg) {
 	}
 }
 
+static void handleErrorChanopPrivsNeeded(struct Message *msg) {
+	require(msg, false, 3);
+	uiFormat(
+		idFor(msg->params[1]), Cold, tagTime(msg),
+		"%s", msg->params[2]
+	);
+}
+
 static void handleErrorUserNotInChannel(struct Message *msg) {
 	require(msg, false, 4);
 	uiFormat(
@@ -886,6 +894,7 @@ static const struct Handler {
 	{ "441", handleErrorUserNotInChannel },
 	{ "443", handleErrorUserOnChannel },
 	{ "478", handleErrorBanListFull },
+	{ "482", handleErrorChanopPrivsNeeded },
 	{ "671", handleReplyWhoisGeneric },
 	{ "900", handleReplyLoggedIn },
 	{ "904", handleErrorSASLFail },
-- 
cgit 1.4.1-2-gfad0