1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 14:03:12 +02:00

- Fixed oper count bug which happened on /mode, this was our fault (can't blame services in

this case ;p). Reported by KnAseN and many others (#0002581).
  There might still be other operator count bugs, but these are triggered by a different bug
  and may or may not be caused by services.
This commit is contained in:
Bram Matthys
2006-05-19 11:49:35 +00:00
parent e7e32993af
commit 0b0c06fa14
2 changed files with 9 additions and 2 deletions
+4
View File
@@ -1180,3 +1180,7 @@
which basically means if it allows .*. If you want to require a parameter, use .+ (or
anything other in regex that requires at least one character). Suggested and patch provided
by Nazzy (#0002722).
- Fixed oper count bug which happened on /mode, this was our fault (can't blame services in
this case ;p). Reported by KnAseN and many others (#0002581).
There might still be other operator count bugs, but these are triggered by a different bug
and may or may not be caused by services.
+5 -2
View File
@@ -2346,18 +2346,21 @@ DLLFUNC CMD_FUNC(_m_umode)
if (!(setflags & UMODE_OPER) && IsOper(sptr))
IRCstats.operators++;
/* deal with opercounts and stuff */
if ((setflags & UMODE_OPER) && !IsOper(sptr))
{
IRCstats.operators--;
VERIFY_OPERCOUNT(sptr, "umode1");
}
/* FIXME: This breaks something */
} else /* YES this 'else' must be here, otherwise we can decrease twice. fixes opercount bug. */
if (!(setflags & UMODE_HIDEOPER) && IsHideOper(sptr))
{
if (IsOper(sptr)) /* decrease, but only if GLOBAL oper */
IRCstats.operators--;
VERIFY_OPERCOUNT(sptr, "umode2");
}
/* end of dealing with opercounts */
if ((setflags & UMODE_HIDEOPER) && !IsHideOper(sptr))
{
if (IsOper(sptr)) /* increase, but only if GLOBAL oper */