1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 05:33:13 +02:00

Allow modules loaded after startup to magically reobtain their database objects. Fix os_dns for sql(live)

This commit is contained in:
Adam
2012-12-25 15:52:58 -05:00
parent 556a4375e2
commit 392b591d09
6 changed files with 146 additions and 137 deletions
+2 -51
View File
@@ -35,57 +35,6 @@ void Serialize::RegisterTypes()
memo("Memo", Memo::Unserialize), xline("XLine", XLine::Unserialize);
}
/*stringstream::stringstream() : std::stringstream(), type(Serialize::DT_TEXT), _max(0)
{
}
stringstream::stringstream(const stringstream &ss) : std::stringstream(ss.str()), type(Serialize::DT_TEXT), _max(0)
{
}
Anope::string stringstream::astr() const
{
return this->str();
}
std::istream &stringstream::operator>>(Anope::string &val)
{
val = this->str();
return *this;
}
bool stringstream::operator==(const stringstream &other) const
{
return this->astr() == other.astr();
}
bool stringstream::operator!=(const stringstream &other) const
{
return !(*this == other);
}
stringstream &stringstream::SetType(Serialize::DataType t)
{
this->type = t;
return *this;
}
DataType Serialize::stringstream::GetType() const
{
return this->type;
}
stringstream &stringstream::SetMax(unsigned m)
{
this->_max = m;
return *this;
}
unsigned stringstream::GetMax() const
{
return this->_max;
}*/
Serializable::Serializable() : last_commit(NULL), last_commit_time(0), id(0)
{
throw CoreException("Default Serializable constructor?");
@@ -175,6 +124,8 @@ Type::Type(const Anope::string &n, unserialize_func f, Module *o) : name(n), un
{
TypeOrder.push_back(this->name);
Types[this->name] = this;
FOREACH_MOD(I_OnSerializeTypeCreate, OnSerializeTypeCreate(this));
}
Type::~Type()