summaryrefslogtreecommitdiff
path: root/modules/commands/cs_seen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_seen.cpp')
-rw-r--r--modules/commands/cs_seen.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp
index f828e181d..3c63e56ed 100644
--- a/modules/commands/cs_seen.cpp
+++ b/modules/commands/cs_seen.cpp
@@ -23,7 +23,7 @@ struct SeenInfo;
typedef Anope::insensitive_map<SeenInfo *> database_map;
database_map database;
-struct SeenInfo : Serializable<SeenInfo>
+struct SeenInfo : Serializable
{
Anope::string nick;
Anope::string vhost;
@@ -33,6 +33,10 @@ struct SeenInfo : Serializable<SeenInfo>
Anope::string message; // for part/kick/quit
time_t last; // the time when the user was last seen
+ SeenInfo() : Serializable("SeenInfo")
+ {
+ }
+
serialized_data serialize()
{
serialized_data data;
@@ -304,11 +308,12 @@ class DataBasePurger : public CallBack
class CSSeen : public Module
{
+ SerializeType seeninfo_type;
CommandSeen commandseen;
CommandOSSeen commandosseen;
DataBasePurger purger;
public:
- CSSeen(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandseen(this), commandosseen(this), purger(this)
+ CSSeen(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), seeninfo_type("SeenInfo", SeenInfo::unserialize), commandseen(this), commandosseen(this), purger(this)
{
this->SetAuthor("Anope");
@@ -322,8 +327,6 @@ class CSSeen : public Module
ModuleManager::Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnReload();
-
- Serializable<SeenInfo>::Alloc.Register("SeenInfo");
}
void OnReload()