degesch: fix display of RPL_INVITING

This commit is contained in:
Přemysl Eric Janouch 2015-06-20 22:50:28 +02:00
parent 193dd36112
commit 7bd0eefea8
1 changed files with 24 additions and 0 deletions

View File

@ -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 static void
irc_handle_isupport_prefix (struct server *s, char *value) 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 static void
irc_process_numeric (struct server *s, irc_process_numeric (struct server *s,
const struct irc_message *msg, unsigned long numeric) 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; irc_handle_rpl_creationtime (s, msg); buffer = NULL; break;
case IRC_RPL_TOPICWHOTIME: case IRC_RPL_TOPICWHOTIME:
irc_handle_rpl_topicwhotime (s, msg); buffer = NULL; break; 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: case IRC_ERR_NICKNAMEINUSE:
// TODO: if (state == IRC_CONNECTED), use a different nick; // TODO: if (state == IRC_CONNECTED), use a different nick;