summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/main.cpp54
-rw-r--r--src/modules/m_spanningtree/main.h10
-rw-r--r--src/modules/m_spanningtree/precommand.cpp5
3 files changed, 0 insertions, 69 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 4c982356a..fc4e31906 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -28,7 +28,6 @@
#include "protocolinterface.h"
ModuleSpanningTree::ModuleSpanningTree()
- : max_local(0), max_global(0)
{
Utils = new SpanningTreeUtilities(this);
command_rconnect = new CommandRConnect(this, Utils);
@@ -97,11 +96,6 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops)
Current->GetDesc().c_str());
}
-int ModuleSpanningTree::CountLocalServs()
-{
- return Utils->TreeRoot->ChildCount();
-}
-
int ModuleSpanningTree::CountServs()
{
return Utils->serverlist.size();
@@ -114,54 +108,6 @@ void ModuleSpanningTree::HandleLinks(const std::vector<std::string>& parameters,
return;
}
-void ModuleSpanningTree::HandleLusers(const std::vector<std::string>& parameters, User* user)
-{
- unsigned int n_users = ServerInstance->Users->UserCount();
-
- /* Only update these when someone wants to see them, more efficient */
- if ((unsigned int)ServerInstance->Users->LocalUserCount() > max_local)
- max_local = ServerInstance->Users->LocalUserCount();
- if (n_users > max_global)
- max_global = n_users;
-
- unsigned int ulined_count = 0;
- unsigned int ulined_local_count = 0;
-
- /* If ulined are hidden and we're not an oper, count the number of ulined servers hidden,
- * locally and globally (locally means directly connected to us)
- */
- if ((Utils->HideULines) && (!IS_OPER(user)))
- {
- for (server_hash::iterator q = Utils->serverlist.begin(); q != Utils->serverlist.end(); q++)
- {
- if (ServerInstance->ULine(q->second->GetName().c_str()))
- {
- ulined_count++;
- if (q->second->GetParent() == Utils->TreeRoot)
- ulined_local_count++;
- }
- }
- }
- user->WriteNumeric(251, "%s :There are %d users and %d invisible on %d servers",user->nick.c_str(),
- n_users-ServerInstance->Users->ModeCount('i'),
- ServerInstance->Users->ModeCount('i'),
- ulined_count ? this->CountServs() - ulined_count : this->CountServs());
-
- if (ServerInstance->Users->OperCount())
- user->WriteNumeric(252, "%s %d :operator(s) online",user->nick.c_str(),ServerInstance->Users->OperCount());
-
- if (ServerInstance->Users->UnregisteredUserCount())
- user->WriteNumeric(253, "%s %d :unknown connections",user->nick.c_str(),ServerInstance->Users->UnregisteredUserCount());
-
- if (ServerInstance->ChannelCount())
- user->WriteNumeric(254, "%s %ld :channels formed",user->nick.c_str(),ServerInstance->ChannelCount());
-
- user->WriteNumeric(255, "%s :I have %d clients and %d servers",user->nick.c_str(),ServerInstance->Users->LocalUserCount(),ulined_local_count ? this->CountLocalServs() - ulined_local_count : this->CountLocalServs());
- user->WriteNumeric(265, "%s :Current Local Users: %d Max: %d",user->nick.c_str(),ServerInstance->Users->LocalUserCount(),max_local);
- user->WriteNumeric(266, "%s :Current Global Users: %d Max: %d",user->nick.c_str(),n_users,max_global);
- return;
-}
-
std::string ModuleSpanningTree::TimeToStr(time_t secs)
{
time_t mins_up = secs / 60;
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index b152757b9..69bd7253c 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -46,8 +46,6 @@ class Autoconnect;
*/
class ModuleSpanningTree : public Module
{
- unsigned int max_local;
- unsigned int max_global;
CommandRConnect* command_rconnect;
CommandRSQuit* command_rsquit;
CommandSVSJoin* command_svsjoin;
@@ -72,10 +70,6 @@ class ModuleSpanningTree : public Module
*/
void ShowLinks(TreeServer* Current, User* user, int hops);
- /** Counts local servers
- */
- int CountLocalServs();
-
/** Counts local and remote servers
*/
int CountServs();
@@ -84,10 +78,6 @@ class ModuleSpanningTree : public Module
*/
void HandleLinks(const std::vector<std::string>& parameters, User* user);
- /** Handle LUSERS command
- */
- void HandleLusers(const std::vector<std::string>& parameters, User* user);
-
/** Show MAP output to a user (recursive)
*/
void ShowMap(TreeServer* Current, User* user, int depth, int &line, char* names, int &maxnamew, char* stats);
diff --git a/src/modules/m_spanningtree/precommand.cpp b/src/modules/m_spanningtree/precommand.cpp
index c43e4e927..b005510d8 100644
--- a/src/modules/m_spanningtree/precommand.cpp
+++ b/src/modules/m_spanningtree/precommand.cpp
@@ -58,11 +58,6 @@ ModResult ModuleSpanningTree::OnPreCommand(std::string &command, std::vector<std
{
return this->HandleTime(parameters,user);
}
- else if (command == "LUSERS")
- {
- this->HandleLusers(parameters,user);
- return MOD_RES_DENY;
- }
else if (command == "LINKS")
{
this->HandleLinks(parameters,user);