From f65e857d4e342bf63fee9d8a5b2db0fde76b80a2 Mon Sep 17 00:00:00 2001 From: griever Date: Tue, 15 Jan 2002 04:27:14 +0000 Subject: [PATCH] sendto_ops is SNO_SNOTICE now --- Changes | 2 ++ include/struct.h | 9 ++++++--- src/s_user.c | 20 ++------------------ 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/Changes b/Changes index 0722ce9e6..095abeab4 100644 --- a/Changes +++ b/Changes @@ -1109,3 +1109,5 @@ v- Fixed some bugreport stuff - Maybe (but I doubt it) fixed bug #0000040 (Win32 resolver crash) reported by Kyver - Hey everyone it's point release time... I completely screwed up check_for_target_limit - Made the kline-address error easier to understand (must be instead of is not) +- Made a SNOMASK for the +s notices, so you arent forced into hearing them if you just + want say +k diff --git a/include/struct.h b/include/struct.h index c3c567a8c..9aeeefb92 100644 --- a/include/struct.h +++ b/include/struct.h @@ -284,9 +284,12 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */ #define SNO_TKL 0x0080 #define SNO_NICKCHANGE 0x0100 #define SNO_QLINE 0x0200 +#define SNO_SNOTICE 0x0400 -#define SNO_DEFOPER "+kcfvGq" -#define SNO_DEFUSER "+k" +#define SNO_DEFOPER "+kscfvGq" +#define SNO_DEFUSER "+ks" + +#define SNO_NONOPERS (SNO_KILLS | SNO_SNOTICE) #define SEND_UMODES (UMODE_INVISIBLE|UMODE_OPER|UMODE_WALLOP|UMODE_FAILOP|UMODE_HELPOP|UMODE_RGSTRONLY|UMODE_REGNICK|UMODE_SADMIN|UMODE_NETADMIN|UMODE_COADMIN|UMODE_ADMIN|UMODE_SERVICES|UMODE_HIDE|UMODE_WHOIS|UMODE_KIX|UMODE_BOT|UMODE_SECURE|UMODE_HIDING|UMODE_DEAF|UMODE_VICTIM|UMODE_HIDEOPER|UMODE_SETHOST|UMODE_STRIPBADWORDS|UMODE_WEBTV) #define ALL_UMODES (SEND_UMODES|UMODE_SERVNOTICE|UMODE_LOCOP|UMODE_SERVICES) @@ -340,7 +343,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */ #define IsPerson(x) ((x)->user && IsClient(x)) #define IsPrivileged(x) (IsAnOper(x) || IsServer(x)) #define SendWallops(x) (!IsMe(x) && ((x)->umodes & UMODE_WALLOP)) -#define SendServNotice(x) ((x)->umodes & UMODE_SERVNOTICE) +#define SendServNotice(x) ((x)->user->snomask & SNO_SNOTICE) #define IsListening(x) ((x)->flags & FLAGS_LISTEN) #define DoAccess(x) ((x)->flags & FLAGS_CHKACCESS) #define IsLocal(x) ((x)->flags & FLAGS_LOCAL) diff --git a/src/s_user.c b/src/s_user.c index bb05529a8..0582f49ad 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -72,6 +72,7 @@ int sno_mask[] = { SNO_TKL, 'G', SNO_NICKCHANGE, 'n', SNO_QLINE, 'q', + SNO_SNOTICE, 's', 0, 0 }; @@ -2095,24 +2096,7 @@ void set_snomask(aClient *sptr, char *snomask) { } } if (!IsAnOper(sptr)) { - if (sptr->user->snomask & SNO_CLIENT) - sptr->user->snomask &= ~SNO_CLIENT; - if (sptr->user->snomask & SNO_FCLIENT) - sptr->user->snomask &= ~SNO_FCLIENT; - if (sptr->user->snomask & SNO_FLOOD) - sptr->user->snomask &= ~SNO_FLOOD; - if (sptr->user->snomask & SNO_JUNK) - sptr->user->snomask &= ~SNO_JUNK; - if (sptr->user->snomask & SNO_EYES) - sptr->user->snomask &= ~SNO_EYES; - if (sptr->user->snomask & SNO_VHOST) - sptr->user->snomask &= ~SNO_VHOST; - if (sptr->user->snomask & SNO_TKL) - sptr->user->snomask &= ~SNO_TKL; - if (sptr->user->snomask & SNO_NICKCHANGE) - sptr->user->snomask &= ~SNO_NICKCHANGE; - if (sptr->user->snomask & SNO_QLINE) - sptr->user->snomask &= ~SNO_QLINE; + sptr->user->snomask &= (SNO_NONOPERS); } }