#include "inspircd.h"
#include "modules/httpd.h"
#include "xline.h"
-#include "protocol.h"
class ModuleHttpStats : public Module
{
ret += it->second;
ret += ';';
}
- else if (*x == 0x9 || *x == 0xA || *x == 0xD || *x >= 0x20)
+ else if (*x == 0x09 || *x == 0x0A || *x == 0x0D || ((*x >= 0x20) && (*x <= 0x7e)))
{
// The XML specification defines the following characters as valid inside an XML document:
// Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
<< Sanitize(ServerInstance->GetVersionString()) << "</version></server>";
data << "<general>";
- data << "<usercount>" << ServerInstance->Users->clientlist->size() << "</usercount>";
- data << "<channelcount>" << ServerInstance->chanlist->size() << "</channelcount>";
+ data << "<usercount>" << ServerInstance->Users->GetUsers().size() << "</usercount>";
+ data << "<channelcount>" << ServerInstance->GetChans().size() << "</channelcount>";
data << "<opercount>" << ServerInstance->Users->all_opers.size() << "</opercount>";
- data << "<socketcount>" << (ServerInstance->SE->GetUsedFds()) << "</socketcount><socketmax>" << ServerInstance->SE->GetMaxFds() << "</socketmax><socketengine>" << ServerInstance->SE->GetName() << "</socketengine>";
+ data << "<socketcount>" << (SocketEngine::GetUsedFds()) << "</socketcount><socketmax>" << SocketEngine::GetMaxFds() << "</socketmax><socketengine>" INSPIRCD_SOCKETENGINE_NAME "</socketengine>";
time_t current_time = 0;
current_time = ServerInstance->Time();
}
data << "</modulelist><channellist>";
- for (chan_hash::const_iterator a = ServerInstance->chanlist->begin(); a != ServerInstance->chanlist->end(); ++a)
+ const chan_hash& chans = ServerInstance->GetChans();
+ for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); ++i)
{
- Channel* c = a->second;
+ Channel* c = i->second;
data << "<channel>";
data << "<usercount>" << c->GetUsers()->size() << "</usercount><channelname>" << Sanitize(c->name) << "</channelname>";
{
Membership* memb = x->second;
data << "<channelmember><uid>" << memb->user->uuid << "</uid><privs>"
- << Sanitize(c->GetAllPrefixChars(x->first)) << "</privs><modes>"
+ << Sanitize(memb->GetAllPrefixChars()) << "</privs><modes>"
<< memb->modes << "</modes>";
DumpMeta(data, memb);
data << "</channelmember>";
data << "</channellist><userlist>";
- for (user_hash::const_iterator a = ServerInstance->Users->clientlist->begin(); a != ServerInstance->Users->clientlist->end(); ++a)
+ const user_hash& users = ServerInstance->Users->GetUsers();
+ for (user_hash::const_iterator i = users.begin(); i != users.end(); ++i)
{
- User* u = a->second;
+ User* u = i->second;
data << "<user>";
data << "<nickname>" << u->nick << "</nickname><uuid>" << u->uuid << "</uuid><realhost>"