+ for (user_hash::const_iterator a = ServerInstance->Users->clientlist->begin(); a != ServerInstance->Users->clientlist->end(); ++a)
+ {
+ User* u = a->second;
+
+ data << "<user>";
+ data << "<nickname>" << u->nick << "</nickname><uuid>" << u->uuid << "</uuid><realhost>"
+ << u->host << "</realhost><displayhost>" << u->dhost << "</displayhost><gecos>"
+ << Sanitize(u->fullname) << "</gecos><server>" << u->server << "</server>";
+ if (u->IsAway())
+ data << "<away>" << Sanitize(u->awaymsg) << "</away><awaytime>" << u->awaytime << "</awaytime>";
+ if (u->IsOper())
+ data << "<opertype>" << Sanitize(u->oper->name) << "</opertype>";
+ data << "<modes>" << u->FormatModes() << "</modes><ident>" << Sanitize(u->ident) << "</ident>";
+ LocalUser* lu = IS_LOCAL(u);
+ if (lu)
+ data << "<port>" << lu->GetServerPort() << "</port><servaddr>"
+ << lu->server_sa.str() << "</servaddr>";
+ data << "<ipaddress>" << u->GetIPString() << "</ipaddress>";
+
+ DumpMeta(data, u);
+
+ data << "</user>";
+ }
+
+ data << "</userlist><serverlist>";
+
+ ProtocolInterface::ServerList sl;
+ ServerInstance->PI->GetServerList(sl);
+
+ for (ProtocolInterface::ServerList::const_iterator b = sl.begin(); b != sl.end(); ++b)