Rename UMODE_SSLCLIENT, IsSSLClient

This commit is contained in:
Ed Kellett 2020-10-28 21:55:26 +00:00
parent d1239f613f
commit 35eccf4930
8 changed files with 13 additions and 15 deletions

View 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;

View 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;

View 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)

View 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)

View 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++;

View 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",

View 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",

View 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";