From 328bf9af1e3067457edd16fab16109393a0760dc Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Wed, 12 Aug 2015 23:21:11 +0200
Subject: degesch: display ERROR messages
So that the user knows he was killed.
---
degesch.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/degesch.c b/degesch.c
index 69e15bd..7f3f6be 100644
--- a/degesch.c
+++ b/degesch.c
@@ -5170,6 +5170,15 @@ irc_handle_cap (struct server *s, const struct irc_message *msg)
str_vector_free (&v);
}
+static void
+irc_handle_error (struct server *s, const struct irc_message *msg)
+{
+ if (msg->params.len < 1)
+ return;
+
+ log_server_error (s, s->buffer, "#m", msg->params.vector[0]);
+}
+
static void
irc_handle_invite (struct server *s, const struct irc_message *msg)
{
@@ -5791,6 +5800,7 @@ g_irc_handlers[] =
{
// This list needs to stay sorted
{ "CAP", irc_handle_cap },
+ { "ERROR", irc_handle_error },
{ "INVITE", irc_handle_invite },
{ "JOIN", irc_handle_join },
{ "KICK", irc_handle_kick },
--
cgit v1.2.3-70-g09d2