+ CallerIDExtInfo(Module* parent)
+ : ExtensionItem("callerid_data", parent)
+ {
+ }
+
+ std::string serialize(SerializeFormat format, const Extensible* container, void* item) const
+ {
+ std::string ret;
+ if (format != FORMAT_NETWORK)
+ {
+ callerid_data* dat = static_cast<callerid_data*>(item);
+ ret = dat->ToString(format);
+ }
+ return ret;
+ }
+
+ void unserialize(SerializeFormat format, Extensible* container, const std::string& value)
+ {
+ if (format == FORMAT_NETWORK)
+ return;
+
+ callerid_data* dat = new callerid_data;
+ irc::commasepstream s(value);
+ std::string tok;
+ if (s.GetToken(tok))
+ dat->lastnotify = ConvToInt(tok);
+
+ while (s.GetToken(tok))
+ {
+ User *u = ServerInstance->FindNick(tok);
+ if ((u) && (u->registered == REG_ALL) && (!u->quitting) && (!IS_SERVER(u)))
+ {
+ if (dat->accepting.insert(u).second)
+ {
+ callerid_data* other = this->get(u, true);
+ other->wholistsme.push_back(dat);
+ }
+ }
+ }
+
+ void* old = set_raw(container, dat);
+ if (old)
+ this->free(old);
+ }
+
+ callerid_data* get(User* user, bool create)