From: Kevin L. Mitchell Date: Thu, 20 Mar 2008 17:41:00 +0000 (+0000) Subject: Author: Kev X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=e0c92b0746b7400ceaed06b7bb9ba3f992360de6 Author: Kev Log message: Make ircu do the right thing if it sees a remote client with user mode +O-- namely, don't show "is an IRC Operator", etc. First step in a multi-phase upgrade to allow local operators to be acknowledged across the net. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1868 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 50234b5..37007c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-20 Kevin L. Mitchell + + * include/client.h: IsLocOp() now checks to see if its MyUser() as + well; IsAnOper() uses IsOper() and IsLocOp() instead of directly + testing the flags + 2008-03-15 Michael Poole * ircd/s_bsd.c (init_connection_limits): Remove errant apostrophe. diff --git a/include/client.h b/include/client.h index aea930a..c38e304 100644 --- a/include/client.h +++ b/include/client.h @@ -531,7 +531,7 @@ struct Client { #define HasFlag(cli, flag) FlagHas(&cli_flags(cli), flag) /** Return non-zero if the client is an IRC operator (global or local). */ -#define IsAnOper(x) (HasFlag(x, FLAG_OPER) || HasFlag(x, FLAG_LOCOP)) +#define IsAnOper(x) (IsOper(x) || IsLocOp(x)) /** Return non-zero if the client's connection is blocked. */ #define IsBlocked(x) HasFlag(x, FLAG_BLOCKED) /** Return non-zero if the client's connection is still being burst. */ @@ -555,8 +555,8 @@ struct Client { #define IsInvisible(x) HasFlag(x, FLAG_INVISIBLE) /** 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). */ -#define IsLocOp(x) HasFlag(x, FLAG_LOCOP) +/** Return non-zero if the client has set mode +O (local operator) locally. */ +#define IsLocOp(x) (MyUser(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. */