X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fclient.h;h=a86633d2652d3c0aece42f9a0dfb0dff575747f1;hb=5fc729d47823a57c8e6e0e3b078522eccd120ca7;hp=175dd94d9c9b2c1c35a85bb7159f6ab1fd0043fc;hpb=c3727b053aa20cecf3984cc0c9c23b0140edf52c;p=ircu2.10.12-pk.git diff --git a/include/client.h b/include/client.h index 175dd94..a86633d 100644 --- a/include/client.h +++ b/include/client.h @@ -179,7 +179,9 @@ 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_NOTCONN, /**< nobody is connected to this client */ FLAG_FAKEHOST, /**< user has a fakehost */ + FLAG_FAKEIDENT, /**< user has a fakeident */ FLAG_NOCHAN, /**< hide user's channels for non-opers */ FLAG_NOIDLE, /**< hide user's idle time for non-opers */ FLAG_XTRAOP, /**< allow overriding +k */ @@ -600,7 +602,7 @@ struct Client { /** Return non-zero if the client caused a net.burst. */ #define IsJunction(x) HasFlag(x, FLAG_JUNCTION) /** Return non-zero if the client has set mode +O (local operator) locally. */ -#define IsLocOp(x) (MyUser(x) && HasFlag(x, FLAG_LOCOP)) +#define IsLocOp(x) (MyConnect(x) && HasFlag(x, FLAG_LOCOP)) /** Return non-zero if the client has set mode +o (global operator). */ #define IsOper(x) HasFlag(x, FLAG_OPER) /** Return non-zero if the client has an active UDP ping request. */ @@ -625,6 +627,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 nobody is connected to this client structure */ +#define IsNotConn(x) HasFlag(x, FLAG_NOTCONN) /** Return non-zero if the client has an active PING request. */ #define IsPingSent(x) HasFlag(x, FLAG_PINGSENT) /** Return non-zero if the client's channels are hidden. */ @@ -648,6 +652,7 @@ struct Client { #define IsSecurityServ(x) HasFlag(x, FLAG_SECURITY_SERV) /** Return non-zero if the client has a fakehost. */ #define IsFakeHost(x) HasFlag(x, FLAG_FAKEHOST) +#define IsFakeIdent(x) HasFlag(x, FLAG_FAKEIDENT) /** Return non-zero if the client has operator or server privileges. */ #define IsPrivileged(x) (IsAnOper(x) || IsServer(x)) @@ -694,8 +699,11 @@ 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 not having anyone connected to it */ +#define SetNotConn(x) SetFlag(x, FLAG_NOTCONN) /** Mark a client as having a fakehost. */ #define SetFakeHost(x) SetFlag(x, FLAG_FAKEHOST) +#define SetFakeIdent(x) SetFlag(x, FLAG_FAKEIDENT) /** Mark a client as having a pending PING. */ #define SetPingSent(x) SetFlag(x, FLAG_PINGSENT) /** Mark a client as having mode +n. */ @@ -749,8 +757,11 @@ struct Client { #define ClearServNotice(x) ClrFlag(x, FLAG_SERVNOTICE) /** Remove mode +x (hidden host) from the client. */ #define ClearHiddenHost(x) ClrFlag(x, FLAG_HIDDENHOST) +/** Mark client as having someone connected to it */ +#define ClearNotConn(x) ClrFlag(x, FLAG_NOTCONN) /** Remove fakehost flag from the flient. */ #define ClearFakeHost(x) ClrFlag(x, FLAG_FAKEHOST) +#define ClearFakeIdent(x) ClrFlag(x, FLAG_FAKEIDENT) /** Clear the client's pending PING flag. */ #define ClearPingSent(x) ClrFlag(x, FLAG_PINGSENT) /** Clear the client's HUB flag. */