~rcr/rirc

35db64b7273041f047de1910b48be9473ec06c0e — Richard Robbins a month ago 491e48c
add disconnect on CAP, AUTHENTICATE errors during registration
1 files changed, 12 insertions(+), 2 deletions(-)

M src/handlers/irc_recv.c
M src/handlers/irc_recv.c => src/handlers/irc_recv.c +12 -2
@@ 1329,13 1329,23 @@ recv_topic(struct server *s, struct irc_message *m)
static int
recv_ircv3_cap(struct server *s, struct irc_message *m)
{
	return ircv3_recv_CAP(s, m);
	int ret;

	if ((ret = ircv3_recv_CAP(s, m)) && !s->registered)
		io_dx(s->connection);

	return ret;
}

static int
recv_ircv3_authenticate(struct server *s, struct irc_message *m)
{
	return ircv3_recv_AUTHENTICATE(s, m);
	int ret;

	if ((ret = ircv3_recv_AUTHENTICATE(s, m)) && !s->registered)
		io_dx(s->connection);

	return ret;
}

static int