if ((http->GetURI() == "/stats") || (http->GetURI() == "/stats/"))
{
- data << "<inspircdstats><server><name>" << ServerInstance->Config->ServerName << "</name><gecos>"
- << Sanitize(ServerInstance->Config->ServerDesc) << "</gecos><version>"
+ data << "<inspircdstats><server><name>" << ServerInstance->Config->ServerName << "</name><description>"
+ << Sanitize(ServerInstance->Config->ServerDesc) << "</description><version>"
<< Sanitize(ServerInstance->GetVersionString()) << "</version></server>";
data << "<general>";
data << "<usercount>" << ServerInstance->Users->GetUsers().size() << "</usercount>";
data << "<channelcount>" << ServerInstance->GetChans().size() << "</channelcount>";
data << "<opercount>" << ServerInstance->Users->all_opers.size() << "</opercount>";
- data << "<socketcount>" << (SocketEngine::GetUsedFds()) << "</socketcount><socketmax>" << SocketEngine::GetMaxFds() << "</socketmax><socketengine>" INSPIRCD_SOCKETENGINE_NAME "</socketengine>";
+ data << "<socketcount>" << (SocketEngine::GetUsedFds()) << "</socketcount><socketmax>" << SocketEngine::GetMaxFds() << "</socketmax>";
data << "<uptime><boot_time_t>" << ServerInstance->startup_time << "</boot_time_t></uptime>";
data << "<isupport>";
- const std::vector<std::string>& isupport = ServerInstance->ISupport.GetLines();
- for (std::vector<std::string>::const_iterator it = isupport.begin(); it != isupport.end(); it++)
+ const std::vector<Numeric::Numeric>& isupport = ServerInstance->ISupport.GetLines();
+ for (std::vector<Numeric::Numeric>::const_iterator i = isupport.begin(); i != isupport.end(); ++i)
{
- data << Sanitize(*it) << std::endl;
+ const Numeric::Numeric& num = *i;
+ for (std::vector<std::string>::const_iterator j = num.GetParams().begin(); j != num.GetParams().end()-1; ++j)
+ data << "<token>" << Sanitize(*j) << "</token>" << std::endl;
}
data << "</isupport></general><xlines>";
std::vector<std::string> xltypes = ServerInstance->XLines->GetAllTypes();
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->GetName() << "</server>";
+ << u->GetRealHost() << "</realhost><displayhost>" << u->GetDisplayedHost() << "</displayhost><realname>"
+ << Sanitize(u->GetRealName()) << "</realname><server>" << u->server->GetName() << "</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>";
+ data << "<modes>" << u->GetModeLetters().substr(1) << "</modes><ident>" << Sanitize(u->ident) << "</ident>";
LocalUser* lu = IS_LOCAL(u);
if (lu)
data << "<port>" << lu->GetServerPort() << "</port><servaddr>"
data << "<server>";
data << "<servername>" << b->servername << "</servername>";
data << "<parentname>" << b->parentname << "</parentname>";
- data << "<gecos>" << b->gecos << "</gecos>";
+ data << "<description>" << Sanitize(b->description) << "</description>";
data << "<usercount>" << b->usercount << "</usercount>";
// This is currently not implemented, so, commented out.
// data << "<opercount>" << b->opercount << "</opercount>";
Version GetVersion() CXX11_OVERRIDE
{
- return Version("Provides statistics over HTTP via m_httpd.so", VF_VENDOR);
+ return Version("Provides statistics over HTTP via m_httpd", VF_VENDOR);
}
};