- std::string timestring(time_t time)
- {
- char timebuf[60];
- struct tm *mytime = gmtime(&time);
- strftime(timebuf, 59, "%Y-%m-%d %H:%M:%S UTC (", mytime);
- std::string ret(timebuf);
- ret.append(ConvToStr(time)).push_back(')');
- return ret;
- }
-
- void dumpExt(CheckContext& context, Extensible* ext)
- {
- CheckContext::List extlist(context, "metadata");
- for(Extensible::ExtensibleStore::const_iterator i = ext->GetExtList().begin(); i != ext->GetExtList().end(); i++)
- {
- ExtensionItem* item = i->first;
- std::string value = item->serialize(FORMAT_USER, ext, i->second);
- if (!value.empty())
- context.Write("meta:" + item->name, value);
- else if (!item->name.empty())
- extlist.Add(item->name);
- }
-
- extlist.Flush();
- }
-
- CmdResult Handle (const std::vector<std::string> ¶meters, User *user)