Make new_local_user hooks handle dead clients

This commit is contained in:
Ed Kellett 2021-08-19 20:33:55 +01:00
parent e83449d5be
commit b6b40dda24
3 changed files with 10 additions and 1 deletions

View file

@ -22,6 +22,9 @@ check_new_user(void *vdata)
struct Client *source_p = vdata;
const char *drain_reason = ConfigFileEntry.drain_reason;
if (IsAnyDead(source_p))
return;
if (drain_reason == NULL)
drain_reason = "This server is not accepting connections.";

View file

@ -191,6 +191,9 @@ new_local_user(void *data)
struct Client *source_p = data;
struct ConfItem *aconf = source_p->localClient->att_conf;
if (aconf == NULL)
return;
if (!irccmp(aconf->info.name, "webirc."))
exit_client(source_p, source_p, &me, "Cannot log in using a WEBIRC block");
}

View file

@ -40,6 +40,9 @@ check_new_user(void *vdata)
{
struct Client *source_p = vdata;
if (IsAnyDead(source_p))
return;
if (!IsIPSpoof(source_p))
return;