]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/s_user.c
Document need_ssl flags in example.conf.
[irc/rqf/shadowircd.git] / src / s_user.c
index adbcea69bd79d55f94bcde9a28856f0d1b501309..7405256056137ce3395e41e0ada61ce0bc85eea5 100644 (file)
@@ -314,6 +314,14 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
                return (CLIENT_EXITED);
        }
 
+       if(IsConfSSLNeeded(aconf) && !IsSSL(source_p))
+       {
+               ServerStats.is_ref++;
+               sendto_one_notice(source_p, ":*** Notice -- You need to use SSL/TLS to use this server");
+               exit_client(client_p, source_p, &me, "Use SSL/TLS");
+               return (CLIENT_EXITED);
+       }
+
        if(!IsGotId(source_p))
        {
                const char *p;
@@ -975,6 +983,8 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char
                                        source_p->localClient->opername = NULL;
 
                                        rb_dlinkFindDestroy(source_p, &local_oper_list);
+                                       privilegeset_unref(source_p->localClient->privset);
+                                       source_p->localClient->privset = NULL;
                                }
 
                                rb_dlinkFindDestroy(source_p, &oper_list);