]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd_stats.cpp
Change all socketengine methods to be static
[user/henk/code/inspircd.git] / src / modules / m_httpd_stats.cpp
index 5114b26d51e1845ab8a6fef95b733b30ccdbf75d..065ba0bcef9ef29fd5119b4abb205fffb582697a 100644 (file)
@@ -52,7 +52,7 @@ 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]
@@ -107,7 +107,7 @@ class ModuleHttpStats : public Module
                                data << "<usercount>" << ServerInstance->Users->clientlist->size() << "</usercount>";
                                data << "<channelcount>" << ServerInstance->chanlist->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();
@@ -197,7 +197,7 @@ class ModuleHttpStats : public Module
                                        LocalUser* lu = IS_LOCAL(u);
                                        if (lu)
                                                data << "<port>" << lu->GetServerPort() << "</port><servaddr>"
-                                                       << irc::sockets::satouser(lu->server_sa) << "</servaddr>";
+                                                       << lu->server_sa.str() << "</servaddr>";
                                        data << "<ipaddress>" << u->GetIPString() << "</ipaddress>";
 
                                        DumpMeta(data, u);