]> jfr.im git - irc/freenode/solanum.git/commitdiff
Rename UMODE_SSLCLIENT, IsSSLClient
authorEd Kellett <redacted>
Wed, 28 Oct 2020 21:55:26 +0000 (21:55 +0000)
committerEd Kellett <redacted>
Sat, 31 Oct 2020 16:00:02 +0000 (16:00 +0000)
extensions/chm_insecure.c
extensions/chm_sslonly.c
extensions/extb_ssl.c
include/client.h
ircd/s_user.c
modules/m_challenge.c
modules/m_oper.c
modules/m_whois.c

index 14037e821e9495c2ca6dc4f17e6528ccffcdc2ec..b2c4ba5ea360e95d7f699da20eda025ba108864c 100644 (file)
@@ -48,7 +48,7 @@ h_can_join(hook_data_channel *data)
        struct Client *source_p = data->client;
        struct Channel *chptr = data->chptr;
 
-       if(!(chptr->mode.mode & mymode) && !IsSSLClient(source_p)) {
+       if(!(chptr->mode.mode & mymode) && !IsSecureClient(source_p)) {
                /* XXX This is equal to ERR_THROTTLE */
                sendto_one_numeric(source_p, 480, "%s :Cannot join channel (-U) - SSL/TLS required", chptr->chname);
                data->approved = ERR_CUSTOM;
index 2cbc7a47ef9d9557e8d6f1a2bf7c027a6e2f7edf..4c233ccc132dde62268139671ad58c9bfed51bc2 100644 (file)
@@ -46,7 +46,7 @@ h_can_join(hook_data_channel *data)
        struct Client *source_p = data->client;
        struct Channel *chptr = data->chptr;
 
-       if((chptr->mode.mode & mymode) && !IsSSLClient(source_p)) {
+       if((chptr->mode.mode & mymode) && !IsSecureClient(source_p)) {
                /* XXX This is equal to ERR_THROTTLE */
                sendto_one_numeric(source_p, 480, "%s :Cannot join channel (+S) - SSL/TLS required", chptr->chname);
                data->approved = ERR_CUSTOM;
index aa6ea95505fa31f1ac4d688b0fa36c39488dfe8d..627e5439256f4a47082401b56a1bc48de037e716 100644 (file)
@@ -34,7 +34,7 @@ static int eb_ssl(const char *data, struct Client *client_p,
        (void)chptr;
        (void)mode_type;
 
-       if (! IsSSLClient(client_p))
+       if (!IsSecureClient(client_p))
                return EXTBAN_NOMATCH;
 
        if (data != NULL)
index 21b8f06600f4a8a09b1363aee6b813f5bcfe9a72..55b0086d749ab50aae03c4527a97c77dde51baf4 100644 (file)
@@ -453,7 +453,7 @@ struct ListClient
 /* user information flags, only settable by remote mode or local oper */
 #define UMODE_OPER         0x1000      /* Operator */
 #define UMODE_ADMIN        0x2000      /* Admin on server */
-#define UMODE_SSLCLIENT    0x4000      /* using SSL */
+#define UMODE_SECURE       0x4000      /* has a secure connection */
 
 #define DEFAULT_OPER_UMODES (UMODE_SERVNOTICE | UMODE_OPERWALL | \
                              UMODE_WALLOP | UMODE_LOCOPS)
@@ -527,16 +527,14 @@ struct ListClient
 #define IsInvisible(x)          ((x)->umodes & UMODE_INVISIBLE)
 #define SetInvisible(x)         ((x)->umodes |= UMODE_INVISIBLE)
 #define ClearInvisible(x)       ((x)->umodes &= ~UMODE_INVISIBLE)
-#define IsSSLClient(x)         ((x)->umodes & UMODE_SSLCLIENT)
-#define SetSSLClient(x)                ((x)->umodes |= UMODE_SSLCLIENT)
-#define ClearSSLClient(x)      ((x)->umodes &= ~UMODE_SSLCLIENT)
+#define IsSecureClient(x)       ((x)->umodes & UMODE_SECURE)
 #define SendWallops(x)          ((x)->umodes & UMODE_WALLOP)
 #define SendLocops(x)           ((x)->umodes & UMODE_LOCOPS)
 #define SendServNotice(x)       ((x)->umodes & UMODE_SERVNOTICE)
 #define SendOperwall(x)         ((x)->umodes & UMODE_OPERWALL)
-#define IsService(x)           ((x)->umodes & UMODE_SERVICE)
-#define IsDeaf(x)              ((x)->umodes & UMODE_DEAF)
-#define IsNoForward(x)         ((x)->umodes & UMODE_NOFORWARD)
+#define IsService(x)            ((x)->umodes & UMODE_SERVICE)
+#define IsDeaf(x)               ((x)->umodes & UMODE_DEAF)
+#define IsNoForward(x)          ((x)->umodes & UMODE_NOFORWARD)
 
 #define SetGotId(x)             ((x)->flags |= FLAGS_GOTID)
 #define IsGotId(x)              (((x)->flags & FLAGS_GOTID) != 0)
index 5d6d0afc8035d5fe727f8fcfbe962dbe3ec032e2..1a9d51f433c80f77ab81005ae956388385ee04e0 100644 (file)
@@ -89,7 +89,7 @@ int user_modes[256] = {
        0,                      /* W */
        0,                      /* X */
        0,                      /* Y */
-       UMODE_SSLCLIENT,        /* Z */
+       UMODE_SECURE,           /* Z */
        /* 0x5B */ 0, 0, 0, 0, 0, 0, /* 0x60 */
        UMODE_ADMIN,            /* a */
        0,                      /* b */
@@ -635,7 +635,7 @@ register_local_user(struct Client *client_p, struct Client *source_p)
        }
 
        if (IsSecure(source_p))
-               source_p->umodes |= UMODE_SSLCLIENT;
+               source_p->umodes |= UMODE_SECURE;
 
        if (source_p->umodes & UMODE_INVISIBLE)
                Count.invisi++;
index 8174acbd49cb2cef52535ee06ac7c88dcaf40145..137dfb7afaec474e30ed3ad2b7d3d0716ae6bf39 100644 (file)
@@ -222,7 +222,7 @@ m_challenge(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou
                return;
        }
 
-       if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p))
+       if(IsOperConfNeedSSL(oper_p) && !IsSecureClient(source_p))
        {
                sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
                ilog(L_FOPER, "FAILED CHALLENGE (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS",
index 66bd1f786a8a2b66625c58aa066821eae60dffc8..ba91547b90f2ba07ef6e5917658a7ca3850ad5e4 100644 (file)
@@ -101,7 +101,7 @@ m_oper(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p
                return;
        }
 
-       if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p))
+       if(IsOperConfNeedSSL(oper_p) && !IsSecureClient(source_p))
        {
                sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
                ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS",
index 281c6d8584f8491bbcffb27565f6c16540ba87e5..40544b7e35e274198a0ae0a7e22ce76449aea117 100644 (file)
@@ -337,7 +337,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
                                   target_p->name, buf);
        }
 
-       if(IsSSLClient(target_p))
+       if(IsSecureClient(target_p))
        {
                char cbuf[256] = "is using a secure connection";