/* $ModDesc: Provides statistics over HTTP via m_httpd.so */
-extern user_hash clientlist;
-extern chan_hash chanlist;
extern std::vector<userrec*> all_opers;
extern InspIRCd* ServerInstance;
data << "<head>";
data << "<link rel='stylesheet' href='" << this->stylesheet << "' type='text/css' />";
- data << "<title>InspIRCd server statisitics for " << Srv->GetServerName() << " (" << Srv->GetServerDescription() << ")</title>";
+ data << "<title>InspIRCd server statisitics for " << Srv->GetServerName() << " (" << ServerInstance->Config->ServerDesc << ")</title>";
data << "</head><body>";
- data << "<h1>InspIRCd server statisitics for " << Srv->GetServerName() << " (" << Srv->GetServerDescription() << ")</h1>";
+ data << "<h1>InspIRCd server statisitics for " << Srv->GetServerName() << " (" << ServerInstance->Config->ServerDesc << ")</h1>";
data << "<div class='totals'>";
data << "<h2>Totals</h2>";
data << "<table>";
- data << "<tr><td>Users</td><td>" << clientlist.size() << "</td></tr>";
- data << "<tr><td>Channels</td><td>" << chanlist.size() << "</td></tr>";
+ data << "<tr><td>Users</td><td>" << ServerInstance->clientlist.size() << "</td></tr>";
+ data << "<tr><td>Channels</td><td>" << ServerInstance->chanlist.size() << "</td></tr>";
data << "<tr><td>Opers</td><td>" << all_opers.size() << "</td></tr>";
data << "<tr><td>Sockets</td><td>" << (ServerInstance->SE->GetMaxFds() - ServerInstance->SE->GetRemainingFds()) << " (Max: " << ServerInstance->SE->GetMaxFds() << " via socket engine '" << ServerInstance->SE->GetName() << "')</td></tr>";
data << "</table>";
int n = 0;
for (SortedIter a = so->begin(); ((a != so->end()) && (n < 25)); a++, n++)
{
- chanrec* c = Srv->FindChannel(a->second.c_str());
+ chanrec* c = ServerInstance->FindChan(a->second.c_str());
if (c)
{
data << "<tr><td>" << a->first << "</td><td>" << a->second << "</td>";