summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-12-04 14:58:14 -0500
committerJune McEnroe <june@causal.agency>2018-12-04 14:58:14 -0500
commite01b03c96383b9e15fe1a2929c4d19869121d0a1 (patch)
tree225e3aeda7c1f34c32810f60c53e522cebdcb1b0 /handle.c
parentAdd -a auth option for unimplemented SASL (diff)
downloadcatgirl-e01b03c96383b9e15fe1a2929c4d19869121d0a1.tar.gz
catgirl-e01b03c96383b9e15fe1a2929c4d19869121d0a1.zip
Revert half-working reconnecting stuff
Diffstat (limited to '')
-rw-r--r--handle.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/handle.c b/handle.c
index 973845f..137f859 100644
--- a/handle.c
+++ b/handle.c
@@ -94,6 +94,14 @@ static void handlePing(char *prefix, char *params) {
 	ircFmt("PONG %s\r\n", params);
 }
 
+static void handleError(char *prefix, char *params) {
+	(void)prefix;
+	(void)params;
+	// TODO: Show error if unintended disconnect.
+	uiExit();
+	exit(EX_OK);
+}
+
 static void handleErrorErroneousNickname(char *prefix, char *params) {
 	char *mesg;
 	parse(prefix, NULL, NULL, NULL, params, 3, 0, NULL, NULL, &mesg);
@@ -470,6 +478,7 @@ static const struct {
 	{ "401", handleErrorNoSuchNick },
 	{ "432", handleErrorErroneousNickname },
 	{ "433", handleErrorErroneousNickname },
+	{ "ERROR", handleError },
 	{ "JOIN", handleJoin },
 	{ "KICK", handleKick },
 	{ "NICK", handleNick },