From c6738826700b41ca8e4d7c011d92ddce552a7b60 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Wed, 10 Jun 2015 22:15:58 +0200 Subject: degesch: handle RPL_UMODEIS --- degesch.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/degesch.c b/degesch.c index defdb29..88ba593 100644 --- a/degesch.c +++ b/degesch.c @@ -4715,6 +4715,19 @@ irc_handle_rpl_userhost (struct server *s, const struct irc_message *msg) str_vector_free (&v); } +static void +irc_handle_rpl_umodeis (struct server *s, const struct irc_message *msg) +{ + if (msg->params.len < 2) + return; + + str_reset (&s->irc_user_mode); + irc_handle_mode_user (s, msg->params.vector + 1); + + // XXX: do we want to log a message? + refresh_prompt (s->ctx); +} + static void irc_handle_rpl_namreply (struct server *s, const struct irc_message *msg) { @@ -5127,6 +5140,8 @@ irc_process_numeric (struct server *s, irc_handle_rpl_isupport (s, msg); break; case IRC_RPL_USERHOST: irc_handle_rpl_userhost (s, msg); break; + case IRC_RPL_UMODEIS: + irc_handle_rpl_umodeis (s, msg); buffer = NULL; break; case IRC_RPL_NAMREPLY: irc_handle_rpl_namreply (s, msg); buffer = NULL; break; case IRC_RPL_ENDOFNAMES: -- cgit v1.2.3-70-g09d2