diff options
| author | 2006-07-11 14:58:07 +0000 | |
|---|---|---|
| committer | 2006-07-11 14:58:07 +0000 | |
| commit | f5da4b395438cf5e461455e63323a83dc0d82db0 (patch) | |
| tree | 53a25a011cba1c09ff86ea71ef73ad44936b44fa /src/modules/m_httpd_stats.cpp | |
| parent | Allow modules to change the content-type of the document (defaults to text/html) (diff) | |
| download | inspircd++-f5da4b395438cf5e461455e63323a83dc0d82db0.tar.gz inspircd++-f5da4b395438cf5e461455e63323a83dc0d82db0.tar.bz2 inspircd++-f5da4b395438cf5e461455e63323a83dc0d82db0.zip | |
Basic html output other than chickens
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4338 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd_stats.cpp')
| -rw-r--r-- | src/modules/m_httpd_stats.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index a421ed366..dc93a9dd4 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -29,11 +29,14 @@ using namespace std; class ModuleHttpStats : public Module { Server* Srv; + std::string stylesheet; public: void ReadConfig() { + ConfigReader c; + this->stylesheet = c.ReadValue("httpstats", "stylesheet", 0); } ModuleHttpStats(Server* Me) : Module::Module(Me) @@ -50,7 +53,13 @@ class ModuleHttpStats : public Module { log(DEBUG,"HTTP URL!"); - data << "<html><h1>Chickens</h1></html>"; + data << "<HTML><HEAD>"; + data << "<TITLE>InspIRCd server statisitics for " << Srv->GetServerName() << " (" << Srv->GetServerDescription() << ")</TITLE>"; + data << "</HEAD><BODY>"; + data << "<H1>InspIRCd server statisitics for " << Srv->GetServerName() << " (" << Srv->GetServerDescription() << ")</H1>"; + + data << "</BODY>"; + data << "</HTML>"; HTTPRequest* http = (HTTPRequest*)event->GetData(); HTTPDocument response(http->sock, &data, 200, "X-Powered-By: m_http_stats.so\r\n"); |
