]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_connect.c
Importing ratbox3 r25213 changeset
[irc/rqf/shadowircd.git] / modules / m_connect.c
index 34f9c0069812687ee73d4ff9b2d7a58fa27f5d72..ce15ef2dc717965c57ad2576ea5e5e18441704b9 100644 (file)
 #include "ircd.h"
 #include "irc_string.h"
 #include "numeric.h"
-#include "commio.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 **);
@@ -98,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()))\r
+       {\r
+               sendto_one_notice(source_p,\r
+                                 ":Connect: Server %s is set to use SSL/TLS but SSL/TLS is not configured.",\r
+                                 parv[1]);\r
+               return 0;\r
+       }
+
        /*
         * Get port number from user, if given. If not specified,
         * use the default form configuration structure. If missing
@@ -192,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()))\r
+       {\r
+               sendto_one_notice(source_p,\r
+                                 ":Connect: Server %s is set to use SSL/TLS but SSL/TLS is not configured.",\r
+                                 parv[1]);\r
+               return 0;\r
+       }
+
        /*
         * Get port number from user, if given. If not specified,
         * use the default form configuration structure. If missing