]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd.cpp
Convert more modules
[user/henk/code/inspircd.git] / src / modules / m_httpd.cpp
index 3342ba37d425690fa365649f6d9b36fe47ca033a..ed02c0a5c5745da51921803e303974da814253a2 100644 (file)
@@ -11,9 +11,9 @@
  * ---------------------------------------------------
  */
 
+#include "inspircd.h"
 #include <algorithm>
 #include "modules.h"
-#include "inspircd.h"
 #include "httpd.h"
 
 /* $ModDesc: Provides HTTP serving facilities to modules */
@@ -233,7 +233,7 @@ class HttpServerSocket : public InspSocket
 
                        if (headers.str().find("\r\n\r\n") != std::string::npos)
                        {
-                               if (request_type == "")
+                               if (request_type.empty())
                                {
                                        headers >> request_type;
                                        headers >> uri;
@@ -246,7 +246,7 @@ class HttpServerSocket : public InspSocket
                                if ((InternalState == HTTP_SERVE_WAIT_REQUEST) && (request_type == "POST"))
                                {
                                        /* Do we need to fetch postdata? */
-                                       postdata = "";
+                                       postdata.clear();
                                        InternalState = HTTP_SERVE_RECV_POSTDATA;
                                        std::string header_item;
                                        while (headers >> header_item)
@@ -378,7 +378,7 @@ class ModuleHttpServer : public Module
                }
        }
 
-       ModuleHttpServer(InspIRCd* Me) : Module::Module(Me)
+       ModuleHttpServer(InspIRCd* Me) : Module(Me)
        {
                ReadConfig();
        }
@@ -437,7 +437,7 @@ class ModuleHttpServerFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
 {
        return new ModuleHttpServerFactory;
 }