]> jfr.im git - solanum.git/blobdiff - modules/m_connect.c
Remove stray SetCork.
[solanum.git] / modules / m_connect.c
index 22fb7f21966cd712564cbf085939ba238496eaa4..deb83b8d93438bc47a4f21f5a52c6edc466b226b 100644 (file)
 #include "numeric.h"
 #include "s_conf.h"
 #include "s_newconf.h"
-#include "s_log.h"
+#include "logger.h"
 #include "s_serv.h"
 #include "send.h"
 #include "msg.h"
 #include "parse.h"
 #include "hash.h"
 #include "modules.h"
+#include "sslproc.h"
 
 static int mo_connect(struct Client *, struct Client *, int, const char **);
 static int ms_connect(struct Client *, struct Client *, int, const char **);
@@ -97,6 +98,14 @@ mo_connect(struct Client *client_p, struct Client *source_p, int parc, const cha
                return 0;
        }
 
+       if(ServerConfSSL(server_p) && (!ssl_ok || !get_ssld_count()))
+       {
+               sendto_one_notice(source_p,
+                                 ":Connect: Server %s is set to use SSL/TLS but SSL/TLS is not configured.",
+                                 parv[1]);
+               return 0;
+       }
+
        /*
         * Get port number from user, if given. If not specified,
         * use the default form configuration structure. If missing
@@ -191,6 +200,14 @@ ms_connect(struct Client *client_p, struct Client *source_p, int parc, const cha
                return 0;
        }
 
+       if(ServerConfSSL(server_p) && (!ssl_ok || !get_ssld_count()))
+       {
+               sendto_one_notice(source_p,
+                                 ":Connect: Server %s is set to use SSL/TLS but SSL/TLS is not configured.",
+                                 parv[1]);
+               return 0;
+       }
+
        /*
         * Get port number from user, if given. If not specified,
         * use the default form configuration structure. If missing