From 7e83d6c150c2adea219bdc38d2aa8a50d3f17619 Mon Sep 17 00:00:00 2001 From: codemastr Date: Sun, 6 Mar 2005 16:49:32 +0000 Subject: [PATCH] Made +g get removed when an oper sets -o --- Changes | 1 + src/modules/m_mode.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 355542dc2..477fc8bd6 100644 --- a/Changes +++ b/Changes @@ -757,3 +757,4 @@ - Made windows installer also install doc\technical\* - Removed oldcloak cloaking module, everyone should be using the new cloak one by now. - Updated release notes (translated docs, zlib, doc\technical, sp/cS desynch). +- Made +g get removed when an oper sets -o (#0002399) reported by Ron2K. diff --git a/src/modules/m_mode.c b/src/modules/m_mode.c index 273bbb473..0de5a98ca 100644 --- a/src/modules/m_mode.c +++ b/src/modules/m_mode.c @@ -2216,6 +2216,7 @@ DLLFUNC CMD_FUNC(_m_umode) ClearHideOper(sptr); ClearCoAdmin(sptr); ClearHelpOp(sptr); + ClearFailops(sptr); } /* @@ -2241,12 +2242,15 @@ DLLFUNC CMD_FUNC(_m_umode) This is to remooove the kix bug.. and to protect some stuffie -techie */ - if (MyClient(sptr) && (sptr->umodes & UMODE_KIX) && (!OPCanUmodeq(sptr) || !IsAnOper(sptr))) - sptr->umodes &= ~UMODE_KIX; - if (MyClient(sptr) && (sptr->umodes & UMODE_SECURE) && !IsSecure(sptr)) - sptr->umodes &= ~UMODE_SECURE; - if (MyClient(sptr) && !(sptr->umodes & UMODE_SECURE) && IsSecure(sptr)) - sptr->umodes |= UMODE_SECURE; + if (MyClient(sptr)) + { + if ((sptr->umodes & UMODE_KIX) && (!OPCanUmodeq(sptr) || !IsAnOper(sptr))) + sptr->umodes &= ~UMODE_KIX; + if ((sptr->umodes & UMODE_SECURE) && !IsSecure(sptr)) + sptr->umodes &= ~UMODE_SECURE; + if (!(sptr->umodes & UMODE_SECURE) && IsSecure(sptr)) + sptr->umodes |= UMODE_SECURE; + } } /* * For Services Protection...