diff --git a/Changes b/Changes index 6c2988aba..538c5e72f 100644 --- a/Changes +++ b/Changes @@ -1002,3 +1002,6 @@ seen. gmtime warning still there - SMO recoded but wierd because sendto_umode and sendto_snomask are wierd - chatops actually checks if sender is an oper, why did no one notice this? - bugs in SMO ironed out, now sends to someone with ANY of the umodes/snomasks +- Added #undef SECURECHANMSGSONLYGOTOSECURE - send only channel msgs to +z + people on +z channels +- win32 fixes diff --git a/include/config.h b/include/config.h index 5ac288aaf..e727a594c 100644 --- a/include/config.h +++ b/include/config.h @@ -103,6 +103,13 @@ */ #define PROPER_COREDUMP + +/* + * If channel mode is +z, only send to secure links & people + * +*/ +#undef SECURECHANMSGSONLYGOTOSECURE + /* * be compatible with older cloak keys? If you link to servers beta4 and * earlier without this the cloak keys will produce diff results diff --git a/src/send.c b/src/send.c index 5a91acae8..1b2242382 100644 --- a/src/send.c +++ b/src/send.c @@ -351,6 +351,11 @@ void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr, i = acptr->from->fd; if (MyConnect(acptr) && IsRegisteredUser(acptr)) { +#ifdef SECURECHANMSGSONLYGOTOSECURE + if (chptr->mode.mode & MODE_ONLYSECURE) + if (!IsSecure(acptr)) + continue; +#endif vsendto_prefix_one(acptr, from, pattern, vl); sentalong[i] = 1; } @@ -360,6 +365,12 @@ void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr, * remote link already */ if (sentalong[i] == 0) { +#ifdef SECURECHANMSGSONLYGOTOSECURE + if (chptr->mode.mode & MODE_ONLYSECURE) + if (!IsSecure(acptr->from)) + continue; +#endif + vsendto_prefix_one(acptr, from, pattern, vl); sentalong[i] = 1; }