]> jfr.im git - solanum.git/commitdiff
Make new_local_user hooks handle dead clients
authorEd Kellett <redacted>
Thu, 19 Aug 2021 19:33:55 +0000 (20:33 +0100)
committerEd Kellett <redacted>
Thu, 19 Aug 2021 19:58:36 +0000 (20:58 +0100)
extensions/drain.c
extensions/m_webirc.c
extensions/sasl_usercloak.c

index 01d19cdf1912ad2b47d1049832254cc4862c8769..9829eeb6806a72154b15b4e4727c7a311433ebae 100644 (file)
@@ -22,10 +22,13 @@ 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.";
 
-       if(IsExemptKline(source_p))
+       if (IsExemptKline(source_p))
                return;
 
        exit_client(source_p, source_p, &me, drain_reason);
index 99ae7d42cf501bde5c8cbf387cc417f89c84ff55..f169435d77a07f695e9095ea02ac2124e3407d4c 100644 (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");
 }
index 70001b7f714f3951ea19ce69642744efb574eec2..cb4b91ad7b86d9911b31cd4406c1d889d51fd9d5 100644 (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;