summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/umode_i.cpp6
-rw-r--r--src/modes/umode_o.cpp5
-rw-r--r--src/modes/umode_s.cpp6
-rw-r--r--src/modes/umode_w.cpp7
4 files changed, 24 insertions, 0 deletions
diff --git a/src/modes/umode_i.cpp b/src/modes/umode_i.cpp
index 73d7293a8..e3f81c529 100644
--- a/src/modes/umode_i.cpp
+++ b/src/modes/umode_i.cpp
@@ -31,9 +31,15 @@ ModeAction ModeUserInvisible::OnModeChange(userrec* source, userrec* dest, chanr
if (dest->modes[UM_INVISIBLE] != adding)
{
dest->modes[UM_INVISIBLE] = adding;
+ this->count += (adding ? 1: -1);
return MODEACTION_ALLOW;
}
/* Allow the change */
return MODEACTION_DENY;
}
+
+unsigned int GetCount()
+{
+ return count;
+}
diff --git a/src/modes/umode_o.cpp b/src/modes/umode_o.cpp
index b121df908..6d785f26e 100644
--- a/src/modes/umode_o.cpp
+++ b/src/modes/umode_o.cpp
@@ -42,3 +42,8 @@ ModeAction ModeUserOperator::OnModeChange(userrec* source, userrec* dest, chanre
return MODEACTION_ALLOW;
}
+
+unsigned int GetCount()
+{
+ return ServerInstance->all_opers.size();
+}
diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp
index 9a78f3241..36b830b91 100644
--- a/src/modes/umode_s.cpp
+++ b/src/modes/umode_s.cpp
@@ -31,9 +31,15 @@ ModeAction ModeUserServerNotice::OnModeChange(userrec* source, userrec* dest, ch
if (dest->modes[UM_SERVERNOTICE] != adding)
{
dest->modes[UM_SERVERNOTICE] = adding;
+ this->count += (adding ? 1: -1);
return MODEACTION_ALLOW;
}
/* Allow the change */
return MODEACTION_DENY;
}
+
+unsigned int GetCount()
+{
+ return count;
+}
diff --git a/src/modes/umode_w.cpp b/src/modes/umode_w.cpp
index f9608bf0b..eba24778a 100644
--- a/src/modes/umode_w.cpp
+++ b/src/modes/umode_w.cpp
@@ -31,9 +31,16 @@ ModeAction ModeUserWallops::OnModeChange(userrec* source, userrec* dest, chanrec
if (dest->modes[UM_WALLOPS] != adding)
{
dest->modes[UM_WALLOPS] = adding;
+ this->count += (adding ? 1: -1);
return MODEACTION_ALLOW;
}
/* Allow the change */
return MODEACTION_DENY;
}
+
+unsigned int GetCount()
+{
+ return count;
+}
+