From d1bfc78a45b3ae2f7c3dd3ba1dab64b9e4a4d2eb Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Tue, 13 Apr 2004 22:22:50 +0000 Subject: [PATCH] - Fixed /who +m bug for opers, reported by Bugz (#0001715). - Fixed halfop mode code to not check remote halfop modes (desynch danger). --- Changes | 2 ++ src/channel.c | 3 ++- src/modules/m_who.c | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 13ed9ac21..55dbf0d05 100644 --- a/Changes +++ b/Changes @@ -3086,3 +3086,5 @@ seen. gmtime warning still there just to be sure... (#0001724). - Updated server<->server code for MODE so operoverride bug #0001704 and other feature requests can be fixed/added in the future (3.2.1). +- Fixed /who +m bug for opers, reported by Bugz (#0001715). +- Fixed halfop mode code to not check remote halfop modes (desynch danger). diff --git a/src/channel.c b/src/channel.c index 2bd7bf031..78e689d57 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1825,7 +1825,8 @@ int do_mode_char(aChannel *chptr, long modetype, char modechar, char *param, { /* Ugly halfop hack --sts - this allows halfops to do +b +e +v and so on */ - if (Halfop_mode(modetype) == FALSE) + /* (Syzop/20040413: Allow remote halfop modes */ + if ((Halfop_mode(modetype) == FALSE) && MyClient(cptr)) { int eaten = 0; while (tab->mode != 0x0) diff --git a/src/modules/m_who.c b/src/modules/m_who.c index a466cd8ca..b1fd7258a 100644 --- a/src/modules/m_who.c +++ b/src/modules/m_who.c @@ -439,13 +439,13 @@ char has_common_chan = 0; /* if they only want people with a certain umode */ if (wfl.umodes_want) { - if (!(acptr->umodes & wfl.umodes_want) || (acptr->umodes & UMODE_HIDEOPER)) + if (!(acptr->umodes & wfl.umodes_want) || (!IsAnOper(sptr) && (acptr->umodes & UMODE_HIDEOPER))) return WHO_CANTSEE; } if (wfl.umodes_dontwant) { - if ((acptr->umodes & wfl.umodes_dontwant) && !(acptr->umodes & UMODE_HIDEOPER)) + if ((acptr->umodes & wfl.umodes_dontwant) && (!(acptr->umodes & UMODE_HIDEOPER) || IsAnOper(sptr))) return WHO_CANTSEE; }