- chanrec* c = ServerInstance->FindChan(a->second.c_str());
- if (c && !c->IsModeSet('s') && !c->IsModeSet('p'))
+ Module* m = ServerInstance->Modules->Find(i->c_str());
+ Version v = m->GetVersion();
+ data << "<module><name>" << *i << "</name><description>" << Sanitize(v.description) << "</description></module>";
+ }
+ data << "</modulelist><channellist>";
+
+ for (chan_hash::const_iterator a = ServerInstance->chanlist->begin(); a != ServerInstance->chanlist->end(); ++a)
+ {
+ Channel* c = a->second;
+
+ data << "<channel>";
+ data << "<usercount>" << c->GetUsers()->size() << "</usercount><channelname>" << Sanitize(c->name) << "</channelname>";
+ data << "<channeltopic>";
+ data << "<topictext>" << Sanitize(c->topic) << "</topictext>";
+ data << "<setby>" << Sanitize(c->setby) << "</setby>";
+ data << "<settime>" << c->topicset << "</settime>";
+ data << "</channeltopic>";
+ data << "<channelmodes>" << Sanitize(c->ChanModes(true)) << "</channelmodes>";
+ const UserMembList* ulist = c->GetUsers();
+
+ for (UserMembCIter x = ulist->begin(); x != ulist->end(); ++x)