From 7bd0eefea88109df24f77531e712c8872642eec2 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sat, 20 Jun 2015 22:50:28 +0200 Subject: degesch: fix display of RPL_INVITING --- degesch.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/degesch.c b/degesch.c index 5b514c5..8e28ce8 100644 --- a/degesch.c +++ b/degesch.c @@ -5084,6 +5084,26 @@ irc_handle_rpl_topicwhotime (struct server *s, const struct irc_message *msg) } } +static void +irc_handle_rpl_inviting (struct server *s, const struct irc_message *msg) +{ + if (msg->params.len < 3) + return; + + const char *channel_name = msg->params.vector[1]; + const char *nickname = msg->params.vector[2]; + + struct buffer *buffer;; + if (!(buffer = str_map_find (&s->irc_buffer_map, channel_name))) + buffer = s->buffer; + + // FIXME: logging + buffer_send_status (s->ctx, buffer, + "You have invited %s to %s", nickname, channel_name); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + static void irc_handle_isupport_prefix (struct server *s, char *value) { @@ -5249,6 +5269,8 @@ irc_handle_rpl_isupport (struct server *s, const struct irc_message *msg) } } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + static void irc_process_numeric (struct server *s, const struct irc_message *msg, unsigned long numeric) @@ -5293,6 +5315,8 @@ irc_process_numeric (struct server *s, irc_handle_rpl_creationtime (s, msg); buffer = NULL; break; case IRC_RPL_TOPICWHOTIME: irc_handle_rpl_topicwhotime (s, msg); buffer = NULL; break; + case IRC_RPL_INVITING: + irc_handle_rpl_inviting (s, msg); buffer = NULL; break; case IRC_ERR_NICKNAMEINUSE: // TODO: if (state == IRC_CONNECTED), use a different nick; -- cgit v1.2.3-70-g09d2