summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treeserver.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-07 12:47:29 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-07 12:47:29 +0000
commit2add2b79ca3152201e325ed75c09e0c9bd0fecc4 (patch)
tree76f48c251016c97c72e4e7100e97e839d3a2067b /src/modules/m_spanningtree/treeserver.cpp
parent38cc4dda4df259bac5a3602be6861cf22e4171e9 (diff)
Fix up some usercounts stuff.. to be tested.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8655 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/treeserver.cpp')
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 64f01e83c..4215fcd3d 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -30,7 +30,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, const st
ServerName.clear();
ServerDesc.clear();
VersionString.clear();
- UserCount = OperCount = 0;
+ ServerUserCount = ServerOperCount = 0;
rtt = LastPing = 0;
Warned = Hidden = DupError = false;
VersionString = ServerInstance->GetVersionString();
@@ -46,8 +46,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::str
{
Parent = NULL;
VersionString.clear();
- UserCount = ServerInstance->UserCount();
- OperCount = ServerInstance->OperCount();
+ ServerUserCount = ServerOperCount = 0;
VersionString = ServerInstance->GetVersionString();
Route = NULL;
Socket = NULL; /* Fix by brain */
@@ -65,7 +64,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::str
: ServerInstance(Instance), Parent(Above), ServerName(Name.c_str()), ServerDesc(Desc), Socket(Sock), Utils(Util), Hidden(Hide)
{
VersionString.clear();
- UserCount = OperCount = 0;
+ ServerUserCount = ServerOperCount = 0;
this->SetNextPingTime(time(NULL) + Utils->PingFreq);
this->SetPingFlag();
DupError = false;
@@ -241,24 +240,24 @@ void TreeServer::SetPingFlag()
LastPingWasGood = true;
}
-int TreeServer::GetUserCount()
+unsigned int TreeServer::GetUserCount()
{
- return UserCount;
+ return ServerUserCount;
}
-void TreeServer::AddUserCount()
+void TreeServer::SetUserCount(int diff)
{
- UserCount++;
+ ServerUserCount += diff;
}
-void TreeServer::DelUserCount()
+void TreeServer::SetOperCount(int diff)
{
- UserCount--;
+ ServerOperCount += diff;
}
-int TreeServer::GetOperCount()
+unsigned int TreeServer::GetOperCount()
{
- return OperCount;
+ return ServerOperCount;
}
TreeSocket* TreeServer::GetSocket()