diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-06-20 22:50:28 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-06-20 22:50:28 +0200 |
commit | 7bd0eefea88109df24f77531e712c8872642eec2 (patch) | |
tree | 21c791cd1aea7310d5c96a42fc01ef96f2f7a30c /degesch.c | |
parent | 193dd36112249cff088f08854308636a22babeae (diff) | |
download | xK-7bd0eefea88109df24f77531e712c8872642eec2.tar.gz xK-7bd0eefea88109df24f77531e712c8872642eec2.tar.xz xK-7bd0eefea88109df24f77531e712c8872642eec2.zip |
degesch: fix display of RPL_INVITING
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -5085,6 +5085,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) { char *modes = 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; |