1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:04:47 +02:00

Remove using statements that break unity builds.

This commit is contained in:
Sadie Powell
2026-04-30 13:34:50 +01:00
parent f67c70e485
commit 90ff716ed3
3 changed files with 87 additions and 92 deletions
+55 -58
View File
@@ -23,30 +23,27 @@
#include <stack>
#include <stdexcept>
using Configuration::File;
using Configuration::Conf;
using Configuration::Block;
Configuration::File ServicesConf("anope.conf", false); // Configuration file name
File ServicesConf("anope.conf", false); // Configuration file name
Conf *Config = NULL;
Configuration::Conf *Config = NULL;
Block Block::EmptyBlock("");
Configuration::Block Configuration::Block::EmptyBlock("");
Block::Block(const Anope::string &n) : name(n), linenum(-1)
Configuration::Block::Block(const Anope::string &n) : name(n), linenum(-1)
{
}
const Anope::string &Block::GetName() const
const Anope::string &Configuration::Block::GetName() const
{
return name;
}
int Block::CountBlock(const Anope::string &bname) const
int Configuration::Block::CountBlock(const Anope::string &bname) const
{
return blocks.count(bname);
}
const Block &Block::GetBlock(const Anope::string &bname, int num) const
const Configuration::Block &Configuration::Block::GetBlock(const Anope::string &bname, int num) const
{
std::pair<block_map::const_iterator, block_map::const_iterator> it = blocks.equal_range(bname);
@@ -56,7 +53,7 @@ const Block &Block::GetBlock(const Anope::string &bname, int num) const
return EmptyBlock;
}
Block *Block::GetMutableBlock(const Anope::string &bname, int num)
Configuration::Block *Configuration::Block::GetMutableBlock(const Anope::string &bname, int num)
{
std::pair<block_map::iterator, block_map::iterator> it = blocks.equal_range(bname);
@@ -66,18 +63,18 @@ Block *Block::GetMutableBlock(const Anope::string &bname, int num)
return NULL;
}
bool Block::Set(const Anope::string &tag, const Anope::string &value)
bool Configuration::Block::Set(const Anope::string &tag, const Anope::string &value)
{
items[tag] = value;
return true;
}
const Block::item_map &Block::GetItems() const
const Configuration::Block::item_map &Configuration::Block::GetItems() const
{
return items;
}
template<> const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const
template<> const Anope::string Configuration::Block::Get(const Anope::string &tag, const Anope::string &def) const
{
auto it = items.find(tag);
if (it != items.end())
@@ -86,12 +83,12 @@ template<> const Anope::string Block::Get(const Anope::string &tag, const Anope:
return def;
}
template<> time_t Block::Get(const Anope::string &tag, const Anope::string &def) const
template<> time_t Configuration::Block::Get(const Anope::string &tag, const Anope::string &def) const
{
return Anope::DoTime(Get<const Anope::string>(tag, def));
}
template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) const
template<> bool Configuration::Block::Get(const Anope::string &tag, const Anope::string &def) const
{
const Anope::string &str = Get<const Anope::string>(tag, def);
return !str.empty() && !str.equals_ci("no") && !str.equals_ci("off") && !str.equals_ci("false") && !str.equals_ci("0");
@@ -121,7 +118,7 @@ template<typename T> static void ValidateNotZero(const Anope::string &block, con
throw ConfigException("The value for <" + block + ":" + name + "> cannot be zero!");
}
Conf::Conf() : Block("")
Configuration::Conf::Conf() : Configuration::Block("")
{
ReadTimeout = 0;
DefPrivmsg = false;
@@ -130,12 +127,12 @@ Conf::Conf() : Block("")
for (int i = 0; i < this->CountBlock("include"); ++i)
{
const Block &include = this->GetBlock("include", i);
const auto &include = this->GetBlock("include", i);
const Anope::string &type = include.Get<const Anope::string>("type"),
&file = include.Get<const Anope::string>("name");
File f(file, type == "executable");
Configuration::File f(file, type == "executable");
this->LoadConf(f);
}
@@ -167,7 +164,7 @@ Conf::Conf() : Block("")
}
}
const Block &serverinfo = this->GetBlock("serverinfo"), &options = this->GetBlock("options"),
const auto &serverinfo = this->GetBlock("serverinfo"), &options = this->GetBlock("options"),
&mail = this->GetBlock("mail"), &networkinfo = this->GetBlock("networkinfo");
const Anope::string &servername = serverinfo.Get<Anope::string>("name");
@@ -210,7 +207,7 @@ Conf::Conf() : Block("")
for (int i = 0; i < this->CountBlock("uplink"); ++i)
{
const Block &uplink = this->GetBlock("uplink", i);
const auto &uplink = this->GetBlock("uplink", i);
int protocol;
const Anope::string &protocolstr = uplink.Get<const Anope::string>("protocol", "ipv4");
@@ -243,7 +240,7 @@ Conf::Conf() : Block("")
for (int i = 0; i < this->CountBlock("module"); ++i)
{
const Block &module = this->GetBlock("module", i);
const auto &module = this->GetBlock("module", i);
const Anope::string &modname = module.Get<const Anope::string>("name");
@@ -254,7 +251,7 @@ Conf::Conf() : Block("")
for (int i = 0; i < this->CountBlock("opertype"); ++i)
{
const Block &opertype = this->GetBlock("opertype", i);
const auto &opertype = this->GetBlock("opertype", i);
const Anope::string &oname = opertype.Get<const Anope::string>("name"),
&modes = opertype.Get<const Anope::string>("modes"),
@@ -297,7 +294,7 @@ Conf::Conf() : Block("")
for (int i = 0; i < this->CountBlock("oper"); ++i)
{
const Block &oper = this->GetBlock("oper", i);
const auto &oper = this->GetBlock("oper", i);
const Anope::string &nname = oper.Get<const Anope::string>("name"),
&type = oper.Get<const Anope::string>("type"),
@@ -335,7 +332,7 @@ Conf::Conf() : Block("")
bi->conf = false;
for (int i = 0; i < this->CountBlock("service"); ++i)
{
const Block &service = this->GetBlock("service", i);
const auto &service = this->GetBlock("service", i);
const Anope::string &nick = service.Get<const Anope::string>("nick"),
&user = service.Get<const Anope::string>("user", nick.lower()),
@@ -426,7 +423,7 @@ Conf::Conf() : Block("")
for (int i = 0; i < this->CountBlock("log"); ++i)
{
const Block &log = this->GetBlock("log", i);
const auto &log = this->GetBlock("log", i);
int logage = log.Get<int>("logage");
bool rawio = log.Get<bool>("rawio");
@@ -452,7 +449,7 @@ Conf::Conf() : Block("")
bi->commands.clear();
for (int i = 0; i < this->CountBlock("command"); ++i)
{
const Block &command = this->GetBlock("command", i);
const auto &command = this->GetBlock("command", i);
const Anope::string &service = command.Get<const Anope::string>("service"),
&nname = command.Get<const Anope::string>("name"),
@@ -477,7 +474,7 @@ Conf::Conf() : Block("")
PrivilegeManager::ClearPrivileges();
for (int i = 0; i < this->CountBlock("privilege"); ++i)
{
const Block &privilege = this->GetBlock("privilege", i);
const auto &privilege = this->GetBlock("privilege", i);
const Anope::string &nname = privilege.Get<const Anope::string>("name"),
&desc = privilege.Get<const Anope::string>("desc");
@@ -488,7 +485,7 @@ Conf::Conf() : Block("")
for (int i = 0; i < this->CountBlock("fantasy"); ++i)
{
const Block &fantasy = this->GetBlock("fantasy", i);
const auto &fantasy = this->GetBlock("fantasy", i);
const Anope::string &nname = fantasy.Get<const Anope::string>("name"),
&service = fantasy.Get<const Anope::string>("command"),
@@ -509,7 +506,7 @@ Conf::Conf() : Block("")
for (int i = 0; i < this->CountBlock("command_group"); ++i)
{
const Block &command_group = this->GetBlock("command_group", i);
const auto &command_group = this->GetBlock("command_group", i);
const Anope::string &nname = command_group.Get<const Anope::string>("name"),
&description = command_group.Get<const Anope::string>("description");
@@ -566,7 +563,7 @@ Conf::Conf() : Block("")
Anope::CaseMapRebuild();
}
Conf::~Conf()
Configuration::Conf::~Conf()
{
for (const auto *opertype : MyOperTypes)
delete opertype;
@@ -575,7 +572,7 @@ Conf::~Conf()
delete oper;
}
void Conf::Post(Conf *old)
void Configuration::Conf::Post(Configuration::Conf *old)
{
/* Apply module changes */
for (const auto &mod : old->ModulesAutoLoad)
@@ -641,26 +638,26 @@ Anope::string Configuration::Uplink::str() const
}
Block &Conf::GetModule(const Module *m)
Configuration::Block &Configuration::Conf::GetModule(const Module *m)
{
if (!m)
return Block::EmptyBlock;
return Configuration::Block::EmptyBlock;
return GetModule(m->name);
}
Block &Conf::GetModule(const Anope::string &mname)
Configuration::Block &Configuration::Conf::GetModule(const Anope::string &mname)
{
auto it = modules.find(mname);
if (it != modules.end())
return *it->second;
Block *&block = modules[mname];
auto *&block = modules[mname];
/* Search for the block */
for (std::pair<block_map::iterator, block_map::iterator> iters = blocks.equal_range("module"); iters.first != iters.second; ++iters.first)
{
Block &b = iters.first->second;
auto &b = iters.first->second;
if (b.Get<const Anope::string>("name") == mname)
{
@@ -670,70 +667,70 @@ Block &Conf::GetModule(const Anope::string &mname)
}
if (!block)
block = &Block::EmptyBlock;
block = &Configuration::Block::EmptyBlock;
return GetModule(mname);
}
BotInfo *Conf::GetClient(const Anope::string &cname)
BotInfo *Configuration::Conf::GetClient(const Anope::string &cname)
{
auto it = bots.find(cname);
if (it != bots.end())
return BotInfo::Find(!it->second.empty() ? it->second : cname, true);
Block &block = GetModule(cname.lower());
auto &block = GetModule(cname.lower());
const Anope::string &client = block.Get<const Anope::string>("client");
bots[cname] = client;
return GetClient(cname);
}
const Block &Conf::GetCommand(CommandSource &source)
const Configuration::Block &Configuration::Conf::GetCommand(CommandSource &source)
{
const Anope::string &block_name = source.c ? "fantasy" : "command";
for (std::pair<block_map::iterator, block_map::iterator> iters = blocks.equal_range(block_name); iters.first != iters.second; ++iters.first)
{
Block &b = iters.first->second;
auto &b = iters.first->second;
if (b.Get<Anope::string>("name") == source.command)
return b;
}
return Block::EmptyBlock;
return Configuration::Block::EmptyBlock;
}
File::File(const Anope::string &n, bool e) : name(n), executable(e)
Configuration::File::File(const Anope::string &n, bool e) : name(n), executable(e)
{
}
File::~File()
Configuration::File::~File()
{
this->Close();
}
const Anope::string &File::GetName() const
const Anope::string &Configuration::File::GetName() const
{
return this->name;
}
Anope::string File::GetPath() const
Anope::string Configuration::File::GetPath() const
{
return this->executable ? this->name : Anope::ExpandConfig(this->name);
}
bool File::IsOpen() const
bool Configuration::File::IsOpen() const
{
return this->fp != NULL;
}
bool File::Open()
bool Configuration::File::Open()
{
this->Close();
this->fp = (this->executable ? popen(GetPath().c_str(), "r") : fopen(GetPath().c_str(), "r"));
return this->fp != NULL;
}
void File::Close()
void Configuration::File::Close()
{
if (this->fp != NULL)
{
@@ -745,12 +742,12 @@ void File::Close()
}
}
bool File::End() const
bool Configuration::File::End() const
{
return !this->IsOpen() || feof(this->fp);
}
Anope::string File::Read()
Anope::string Configuration::File::Read()
{
Anope::string ret;
char buf[1024];
@@ -772,19 +769,19 @@ Anope::string File::Read()
return ret;
}
void Conf::LoadConf(File &file)
void Configuration::Conf::LoadConf(Configuration::File &file)
{
if (file.GetName().empty())
return;
if (!file.Open())
{
throw ConfigException(Anope::Format("File %s could not be opened: %s.",
throw ConfigException(Anope::Format("Configuration::File %s could not be opened: %s.",
file.GetPath().c_str(), strerror(errno)));
}
Anope::string itemname, wordbuffer;
std::stack<Block *> block_stack;
std::stack<Configuration::Block *> block_stack;
int linenumber = 0;
bool in_word = false, in_quote = false, in_comment = false;
@@ -893,7 +890,7 @@ void Conf::LoadConf(File &file)
continue;
}
Block *b = block_stack.empty() ? this : block_stack.top();
auto *b = block_stack.empty() ? this : block_stack.top();
auto it = b->blocks.emplace(wordbuffer, Configuration::Block(wordbuffer));
b = &it->second;
b->linenum = linenumber;
@@ -945,7 +942,7 @@ void Conf::LoadConf(File &file)
throw ConfigException("Stray ';' outside of block: " + file.GetName() + ":" + Anope::ToString(linenumber));
}
Block *b = block_stack.top();
auto *b = block_stack.top();
if (b)
{
Log(LOG_DEBUG) << "ln " << linenumber << " EOL: s='" << b->name << "' '" << itemname << "' set to '" << wordbuffer << "'";
@@ -987,7 +984,7 @@ void Conf::LoadConf(File &file)
}
}
Anope::string Conf::ReplaceVars(const Anope::string &str, const File &file, int linenumber)
Anope::string Configuration::Conf::ReplaceVars(const Anope::string &str, const Configuration::File &file, int linenumber)
{
Anope::string ret;
for (auto it = str.begin(); it != str.end(); )
+22 -24
View File
@@ -24,14 +24,12 @@
#include "channels.h"
#include "numeric.h"
using namespace Message;
void Away::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Away::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
source.GetUser()->SetAway(params.empty() ? "" : params[0]);
}
void Capab::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Capab::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
if (params.size() == 1)
{
@@ -47,26 +45,26 @@ void Capab::Run(MessageSource &source, const std::vector<Anope::string> &params,
}
}
void Error::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Error::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
Anope::QuitReason = "Received an error from the uplink: " + params.back();
Anope::Quitting = true;
Log(LOG_TERMINAL) << Anope::QuitReason;
}
Ignore::Ignore(Module *creator, const Anope::string &mname)
Message::Ignore::Ignore(Module *creator, const Anope::string &mname)
: IRCDMessage(creator, mname, 0)
{
SetFlag(FLAG_SOFT_LIMIT);
}
void Ignore::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Ignore::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
Log(LOG_DEBUG_3) << "Intentionally ignoring " << name << " message";
}
void Invite::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Invite::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
User *targ = User::Find(params[0]);
Channel *c = Channel::Find(params[1]);
@@ -77,7 +75,7 @@ void Invite::Run(MessageSource &source, const std::vector<Anope::string> &params
FOREACH_MOD(OnInvite, (source.GetUser(), c, targ));
}
void Join::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Join::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
User *user = source.GetUser();
const Anope::string &channels = params[0];
@@ -111,7 +109,7 @@ void Join::Run(MessageSource &source, const std::vector<Anope::string> &params,
}
}
void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::vector<Anope::string> &modeparams, const std::list<SJoinUser> &users)
void Message::Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::vector<Anope::string> &modeparams, const std::list<SJoinUser> &users)
{
bool created;
Channel *c = Channel::FindOrCreate(chan, created, ts ? ts : Anope::CurTime);
@@ -177,7 +175,7 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co
}
}
void Kick::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Kick::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
const Anope::string &channel = params[0];
const Anope::string &users = params[1];
@@ -194,7 +192,7 @@ void Kick::Run(MessageSource &source, const std::vector<Anope::string> &params,
c->KickInternal(source, user, reason);
}
void Kill::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Kill::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
User *u = User::Find(params[0]);
BotInfo *bi;
@@ -237,7 +235,7 @@ void Message::Mode::Run(MessageSource &source, const std::vector<Anope::string>
}
/* XXX We should cache the file somewhere not open/read/close it on every request */
void MOTD::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::MOTD::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
Server *s = Server::Find(params[0]);
if (s != Me)
@@ -257,7 +255,7 @@ void MOTD::Run(MessageSource &source, const std::vector<Anope::string> &params,
IRCD->SendNumeric(RPL_ENDOFMOTD, source.GetSource(), "End of /MOTD command.");
}
void Notice::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Notice::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
Anope::string message = params[1];
@@ -273,7 +271,7 @@ void Notice::Run(MessageSource &source, const std::vector<Anope::string> &params
}
}
void Part::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Part::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
User *u = source.GetUser();
const Anope::string &reason = params.size() > 1 ? params[1] : "";
@@ -295,12 +293,12 @@ void Part::Run(MessageSource &source, const std::vector<Anope::string> &params,
}
}
void Ping::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Ping::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
IRCD->SendPong(params.size() > 1 ? params[1] : Me->GetSID(), params[0]);
}
void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Privmsg::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
const Anope::string &receiver = params[0];
Anope::string message = params[1];
@@ -358,7 +356,7 @@ void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> &param
return;
}
void Quit::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Quit::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
const Anope::string &reason = params[0];
User *user = source.GetUser();
@@ -368,7 +366,7 @@ void Quit::Run(MessageSource &source, const std::vector<Anope::string> &params,
user->Quit(reason);
}
void SQuit::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::SQuit::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
Server *s = Server::Find(params[0]);
@@ -389,7 +387,7 @@ void SQuit::Run(MessageSource &source, const std::vector<Anope::string> &params,
s->Delete(s->GetName() + " " + s->GetUplink()->GetName());
}
void Stats::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Stats::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
User *u = source.GetUser();
@@ -439,7 +437,7 @@ void Stats::Run(MessageSource &source, const std::vector<Anope::string> &params,
return;
}
void Time::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Time::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
const auto *tm = localtime(&Anope::CurTime);
char timebuf[64];
@@ -448,7 +446,7 @@ void Time::Run(MessageSource &source, const std::vector<Anope::string> &params,
IRCD->SendNumeric(RPL_TIME, source.GetSource(), Me->GetName(), timestr);
}
void Topic::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Topic::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
Channel *c = Channel::Find(params[0]);
if (c)
@@ -457,14 +455,14 @@ void Topic::Run(MessageSource &source, const std::vector<Anope::string> &params,
return;
}
void Version::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Version::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
Module *enc = ModuleManager::FindFirstOf(ENCRYPTION);
IRCD->SendNumeric(RPL_VERSION, source.GetSource(), "Anope-" + Anope::Version(), Me->GetName(), Anope::Format("%s -(%s) -- %s",
IRCD->GetProtocolName().c_str(), enc ? enc->name.c_str() : "(none)", Anope::VersionBuildString().c_str()));
}
void Whois::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
void Message::Whois::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
User *u = User::Find(params[0]);
+10 -10
View File
@@ -22,10 +22,10 @@
#include "xline.h"
#include "access.h"
using namespace Serialize;
std::vector<Anope::string> Serialize::Type::TypeOrder;
std::map<Anope::string, Serialize::Type *> Serialize::Type::Types;
std::vector<Anope::string> Type::TypeOrder;
std::map<Anope::string, Type *> Serialize::Type::Types;
std::list<Serializable *> *Serializable::SerializableItems;
void Serialize::RegisterTypes()
@@ -62,7 +62,7 @@ void Serialize::CheckTypes()
Serializable::Serializable(const Anope::string &serialize_type)
: s_name(serialize_type)
, s_type(Type::Find(serialize_type))
, s_type(Serialize::Type::Find(serialize_type))
{
if (SerializableItems == NULL)
SerializableItems = new std::list<Serializable *>();
@@ -145,7 +145,7 @@ void Serialize::Data::SetType(const Anope::string &key, Serialize::DataType dt)
this->types[key] = dt;
}
Type::Type(const Anope::string &n, Module *o)
Serialize::Type::Type(const Anope::string &n, Module *o)
: name(n)
, owner(o)
{
@@ -166,7 +166,7 @@ Type::Type(const Anope::string &n, Module *o)
}
}
Type::~Type()
Serialize::Type::~Type()
{
auto it = std::find(TypeOrder.begin(), TypeOrder.end(), this->name);
if (it != TypeOrder.end())
@@ -187,7 +187,7 @@ Type::~Type()
}
}
void Type::Create()
void Serialize::Type::Create()
{
if (created)
return;
@@ -196,17 +196,17 @@ void Type::Create()
created = true;
}
void Type::Check()
void Serialize::Type::Check()
{
FOREACH_MOD(OnSerializeTypeCheck, (this));
}
void Type::UpdateTimestamp()
void Serialize::Type::UpdateTimestamp()
{
this->timestamp = Anope::CurTime;
}
Type *Serialize::Type::Find(const Anope::string &name)
Serialize::Type *Serialize::Type::Find(const Anope::string &name)
{
auto it = Types.find(name);
if (it != Types.end())