degesch: fix display of RPL_INVITING
This commit is contained in:
parent
193dd36112
commit
7bd0eefea8
24
degesch.c
24
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;
|
||||
|
Loading…
Reference in New Issue
Block a user