Committer : klmitch CVSROOT : /cvsroot/undernet-ircu Module : ircu2.10 Commit time: 2008-03-20 17:45:40 UTC
Modified files: ChangeLog include/client.h Log message: Author: Kev <[EMAIL PROTECTED]> 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. [pull up from u2_10_12_branch] ---------------------- diff included ---------------------- Index: ircu2.10/ChangeLog diff -u ircu2.10/ChangeLog:1.849 ircu2.10/ChangeLog:1.850 --- ircu2.10/ChangeLog:1.849 Sat Mar 15 19:48:00 2008 +++ ircu2.10/ChangeLog Thu Mar 20 10:45:30 2008 @@ -1,3 +1,9 @@ +2008-03-20 Kevin L. Mitchell <[EMAIL PROTECTED]> + + * 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 Kevin L. Mitchell <[EMAIL PROTECTED]> * ircd/ircd.c: you know what, let's just make those SQUIT Index: ircu2.10/include/client.h diff -u ircu2.10/include/client.h:1.53 ircu2.10/include/client.h:1.54 --- ircu2.10/include/client.h:1.53 Thu Dec 7 18:07:51 2006 +++ ircu2.10/include/client.h Thu Mar 20 10:45:30 2008 @@ -19,7 +19,7 @@ */ /** @file * @brief Structures and functions for handling local clients. - * @version $Id: client.h,v 1.53 2006/12/08 02:07:51 entrope Exp $ + * @version $Id: client.h,v 1.54 2008/03/20 17:45:30 klmitch Exp $ */ #ifndef INCLUDED_client_h #define INCLUDED_client_h @@ -523,7 +523,7 @@ #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. */ @@ -547,8 +547,8 @@ #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. */ ----------------------- End of diff ----------------------- _______________________________________________ Patches mailing list Patches@undernet.org http://undernet.sbg.org/mailman/listinfo/patches