]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd_stats.cpp
Change the API of m_httpd to be dynamic_reference-based
[user/henk/code/inspircd.git] / src / modules / m_httpd_stats.cpp
index 99909d97fac76c47fc72ad3e0f8e222f47e30bbb..faf42d071e5793d7f0c94aab7f936b154f08221c 100644 (file)
 class ModuleHttpStats : public Module
 {
        static std::map<char, char const*> const &entities;
+       HTTPdAPI API;
 
  public:
+       ModuleHttpStats()
+               : API(this)
+       {
+       }
 
        void init() CXX11_OVERRIDE
        {
@@ -233,7 +238,7 @@ class ModuleHttpStats : public Module
                                HTTPDocumentResponse response(this, *http, &data, 200);
                                response.headers.SetHeader("X-Powered-By", "m_httpd_stats.so");
                                response.headers.SetHeader("Content-Type", "text/xml");
-                               response.Send();
+                               API->SendResponse(response);
                        }
                }
        }