diff --git a/extensions/chm_insecure.c b/extensions/chm_insecure.c index 14037e82..b2c4ba5e 100644 --- a/extensions/chm_insecure.c +++ b/extensions/chm_insecure.c @@ -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; diff --git a/extensions/chm_sslonly.c b/extensions/chm_sslonly.c index 2cbc7a47..4c233ccc 100644 --- a/extensions/chm_sslonly.c +++ b/extensions/chm_sslonly.c @@ -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; diff --git a/extensions/extb_ssl.c b/extensions/extb_ssl.c index aa6ea955..627e5439 100644 --- a/extensions/extb_ssl.c +++ b/extensions/extb_ssl.c @@ -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) diff --git a/include/client.h b/include/client.h index 21b8f066..55b0086d 100644 --- a/include/client.h +++ b/include/client.h @@ -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) diff --git a/ircd/s_user.c b/ircd/s_user.c index 5d6d0afc..1a9d51f4 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -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++; diff --git a/modules/m_challenge.c b/modules/m_challenge.c index 8174acbd..137dfb7a 100644 --- a/modules/m_challenge.c +++ b/modules/m_challenge.c @@ -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", diff --git a/modules/m_oper.c b/modules/m_oper.c index 66bd1f78..ba91547b 100644 --- a/modules/m_oper.c +++ b/modules/m_oper.c @@ -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", diff --git a/modules/m_whois.c b/modules/m_whois.c index 281c6d85..40544b7e 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -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";