]> jfr.im git - solanum.git/blobdiff - modules/m_oper.c
Kill Travis
[solanum.git] / modules / m_oper.c
index ba91547b90f2ba07ef6e5917658a7ca3850ad5e4..6c42561c5d2d82cad9cb2c1e29825271da96a147 100644 (file)
@@ -70,6 +70,18 @@ m_oper(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p
        name = parv[1];
        password = parv[2];
 
+       if (ConfigFileEntry.oper_secure_only && !IsSecureClient(source_p))
+       {
+               sendto_one_notice(source_p, ":You must be using a secure connection to /OPER on this server");
+               if (ConfigFileEntry.failed_oper_notice)
+               {
+                       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
+                                       "Failed OPER attempt - missing secure connection by %s (%s@%s)",
+                                       source_p->name, source_p->username, source_p->host);
+               }
+               return;
+       }
+
        if(IsOper(source_p))
        {
                sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);