ERROR instead of NOTICE for failed WEBIRC

This commit is contained in:
Jess Porter 2022-07-01 00:02:53 +01:00 committed by GitHub
parent 5a3e99829a
commit 9d2e66c08d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,17 +106,17 @@ mr_webirc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
if (!IsConfDoSpoofIp(aconf) || irccmp(aconf->info.name, "webirc.")) if (!IsConfDoSpoofIp(aconf) || irccmp(aconf->info.name, "webirc."))
{ {
/* XXX */ /* XXX */
sendto_one(source_p, "NOTICE * :Not a CGI:IRC auth block"); exit_client(client_p, source_p, &me, "Not a CGI:IRC auth block");
return; return;
} }
if (EmptyString(aconf->passwd)) if (EmptyString(aconf->passwd))
{ {
sendto_one(source_p, "NOTICE * :CGI:IRC auth blocks must have a password"); exit_client(client_p, source_p, &me, "CGI:IRC auth blocks must have a password");
return; return;
} }
if (!IsSecure(source_p) && aconf->flags & CONF_FLAGS_NEED_SSL) if (!IsSecure(source_p) && aconf->flags & CONF_FLAGS_NEED_SSL)
{ {
sendto_one(source_p, "NOTICE * :Your CGI:IRC block requires TLS"); exit_client(client_p, source_p, &me, "Your CGI:IRC block requires TLS");
return; return;
} }
@ -129,13 +129,13 @@ mr_webirc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
if (encr == NULL || strcmp(encr, aconf->passwd)) if (encr == NULL || strcmp(encr, aconf->passwd))
{ {
sendto_one(source_p, "NOTICE * :CGI:IRC password incorrect"); exit_client(client_p, source_p, &me, "CGI:IRC password incorrect");
return; return;
} }
if (rb_inet_pton_sock(parv[4], &addr) <= 0) if (rb_inet_pton_sock(parv[4], &addr) <= 0)
{ {
sendto_one(source_p, "NOTICE * :Invalid IP"); exit_client(client_p, source_p, &me, "Invalid IP");
return; return;
} }