#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)
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];
}
}
}
-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
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;
}
-std::vector<Module*> modules(255);
-std::vector<ircd_module*> factory(255);
-
-int MODCOUNT = -1;