summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-25 15:52:58 -0500
committerAdam <Adam@anope.org>2012-12-25 15:52:58 -0500
commit392b591d09509ae788f59b1b63a947ed7d8ad562 (patch)
treefb34d59492895d676e07c47b364829ec9eeb1a14 /src
parent556a4375e226760169150179b5bcaa659aaf055e (diff)
Allow modules loaded after startup to magically reobtain their database objects. Fix os_dns for sql(live)
Diffstat (limited to 'src')
-rw-r--r--src/serialize.cpp53
1 files changed, 2 insertions, 51 deletions
diff --git a/src/serialize.cpp b/src/serialize.cpp
index 0f3e6c7a6..0fff92fab 100644
--- a/src/serialize.cpp
+++ b/src/serialize.cpp
@@ -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()