summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 21:19:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 21:19:19 +0000
commitd02a5866d4fdedec9219aeca0a6048828b394fd2 (patch)
tree1810181d59b71cba1ca68bfb8b3f9252f3c57caa /src/modules.cpp
parent23a4885701cba4a87a5ae027257fb4207c917572 (diff)
Mass-tidyup of module global vars, theyre no longer global vars.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4856 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index f3219df76..9321047a8 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -46,16 +46,11 @@
#include "inspircd.h"
extern InspIRCd* ServerInstance;
-extern int MODCOUNT;
-extern ModuleList modules;
-extern FactoryList factory;
extern time_t TIME;
extern command_table cmdlist;
class Server;
-featurelist Features;
-
// version is a simple class for holding a modules version number
Version::Version(int major, int minor, int revision, int build, int flags)
@@ -298,9 +293,9 @@ Module* InspIRCd::FindFeature(const std::string &FeatureName)
const std::string& InspIRCd::GetModuleName(Module* m)
{
static std::string nothing = ""; /* Prevent compiler warning */
- for (int i = 0; i <= MODCOUNT; i++)
+ for (int i = 0; i <= this->GetModuleCount(); i++)
{
- if (modules[i] == m)
+ if (this->modules[i] == m)
{
return this->Config->module_names[i];
}
@@ -326,11 +321,6 @@ void Server::DelSocket(InspSocket* sock)
}
}
-long Server::GetChannelCount()
-{
- return (long)ServerInstance->chanlist.size();
-}
-
/* This is ugly, yes, but hash_map's arent designed to be
* addressed in this manner, and this is a bit of a kludge.
* Luckily its a specialist function and rarely used by
@@ -578,13 +568,13 @@ bool Server::IsValidMask(const std::string &mask)
return true;
}
-Module* Server::FindModule(const std::string &name)
+Module* InspIRCd::FindModule(const std::string &name)
{
- for (int i = 0; i <= MODCOUNT; i++)
+ for (int i = 0; i <= this->GetModuleCount(); i++)
{
- if (ServerInstance->Config->module_names[i] == name)
+ if (this->Config->module_names[i] == name)
{
- return modules[i];
+ return this->modules[i];
}
}
return NULL;
@@ -806,7 +796,3 @@ int FileReader::FileSize()
}
-std::vector<Module*> modules(255);
-std::vector<ircd_module*> factory(255);
-
-int MODCOUNT = -1;