X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=include%2Fclient.h;fp=include%2Fclient.h;h=a07138348caebcfa0d82d741f7729c2a5e2007b5;hp=f93a3ee425e3032a6de1a7df24f1410a4241168b;hb=7fbfc390d32f9acc3192d011b813f66f35370faa;hpb=0400a5a6479398d82526785c18c0df8bc8b92dce diff --git a/include/client.h b/include/client.h index f93a3ee..a071383 100644 --- a/include/client.h +++ b/include/client.h @@ -56,6 +56,7 @@ struct Whowas; struct hostent; struct Privs; struct AuthRequest; +struct SSLConnection; /* * Structures @@ -166,6 +167,7 @@ enum Flag FLAG_DEBUG, /**< send global debug/anti-hack info */ FLAG_ACCOUNT, /**< account name has been set */ FLAG_HIDDENHOST, /**< user's host is hidden */ + FLAG_SSLCONN, /**< SSL Connection */ FLAG_LAST_FLAG, /**< number of flags */ FLAG_LOCAL_UMODES = FLAG_LOCOP, /**< First local mode flag */ FLAG_GLOBAL_UMODES = FLAG_OPER /**< First global mode flag */ @@ -231,6 +233,7 @@ struct Connection struct CapSet con_capab; /**< Client capabilities (from us) */ struct CapSet con_active; /**< Active capabilities (to us) */ struct AuthRequest* con_auth; /**< Auth request for client */ + struct SSLConnection* con_ssl; /**< SSL connection for client */ }; /** Magic constant to identify valid Connection structures. */ @@ -457,6 +460,8 @@ struct Client { #define con_active(con) (&(con)->con_active) /** Get the auth request for the connection. */ #define con_auth(con) ((con)->con_auth) +/** Get the ssl connection for the connection. */ +#define con_ssl(con) ((con)->con_ssl) #define STAT_CONNECTING 0x001 /**< connecting to another server */ #define STAT_HANDSHAKE 0x002 /**< pass - server sent */ @@ -581,6 +586,8 @@ struct Client { #define IsAccount(x) HasFlag(x, FLAG_ACCOUNT) /** Return non-zero if the client has set mode +x (hidden host). */ #define IsHiddenHost(x) HasFlag(x, FLAG_HIDDENHOST) +/** Return non-zero if the client has set mode +S (SSL Connection). */ +#define IsSSLConn(x) HasFlag(x, FLAG_SSLCONN) /** Return non-zero if the client has an active PING request. */ #define IsPingSent(x) HasFlag(x, FLAG_PINGSENT) @@ -627,6 +634,9 @@ struct Client { #define SetAccount(x) SetFlag(x, FLAG_ACCOUNT) /** Mark a client as having mode +x (hidden host). */ #define SetHiddenHost(x) SetFlag(x, FLAG_HIDDENHOST) +/** Mark a client as having mode +S (SSL Connection). */ +#define SetSSLConn(x) SetFlag(x, FLAG_SSLCONN) + /** Mark a client as having a pending PING. */ #define SetPingSent(x) SetFlag(x, FLAG_PINGSENT) @@ -660,6 +670,8 @@ struct Client { #define ClearServNotice(x) ClrFlag(x, FLAG_SERVNOTICE) /** Remove mode +x (hidden host) from the client. */ #define ClearHiddenHost(x) ClrFlag(x, FLAG_HIDDENHOST) +/** Remove mode +S (SSL Connection) from the client. */ +#define ClearSSLConn(x) ClrFlag(x, FLAG_SSLCONN) /** Clear the client's pending PING flag. */ #define ClearPingSent(x) ClrFlag(x, FLAG_PINGSENT) /** Clear the client's HUB flag. */