X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fclient.h;h=f93a3ee425e3032a6de1a7df24f1410a4241168b;hb=fa78a87f4d4bf4411effdb4e3ba1072625294a9a;hp=c38e30483478c5a4302252bcc06008b98e3d9981;hpb=e0c92b0746b7400ceaed06b7bb9ba3f992360de6;p=ircu2.10.12-pk.git diff --git a/include/client.h b/include/client.h index c38e304..f93a3ee 100644 --- a/include/client.h +++ b/include/client.h @@ -90,7 +90,7 @@ typedef unsigned long flagpage_t; #define FlagClr(set,flag) ((set)->bits[FLAGSET_INDEX(flag)] &= ~FLAGSET_MASK(flag)) /** String containing valid user modes, in no particular order. */ -#define infousermodes "dioswkgx" +#define infousermodes "diOoswkgx" /** Operator privileges. */ enum Priv @@ -317,6 +317,8 @@ struct Client { #define cli_username(cli) ((cli)->cli_username) /** Get client realname (information field). */ #define cli_info(cli) ((cli)->cli_info) +/** Get client account string. */ +#define cli_account(cli) (cli_user(cli) ? cli_user(cli)->account : "0") /** Get number of incoming bytes queued for client. */ #define cli_count(cli) con_count(cli_connect(cli)) @@ -556,7 +558,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. */ @@ -660,6 +662,8 @@ struct Client { #define ClearHiddenHost(x) ClrFlag(x, FLAG_HIDDENHOST) /** Clear the client's pending PING flag. */ #define ClearPingSent(x) ClrFlag(x, FLAG_PINGSENT) +/** Clear the client's HUB flag. */ +#define ClearHub(x) ClrFlag(x, FLAG_HUB) /* free flags */ #define FREEFLAG_SOCKET 0x0001 /**< socket needs to be freed */