summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 21:05:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 21:05:24 +0000
commit02d9fc3279bf5b09256f535d9c2c873526a619fd (patch)
treed262c9eaf233a9d2a506eb2ad18407c8e65b7d62
parent1b9da9797151a770dda699c75419678db4b31257 (diff)
Http service provider module (this doesnt do anything yet!)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4307 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_http.cpp101
1 files changed, 101 insertions, 0 deletions
diff --git a/src/modules/m_http.cpp b/src/modules/m_http.cpp
new file mode 100644
index 000000000..b4f77903a
--- /dev/null
+++ b/src/modules/m_http.cpp
@@ -0,0 +1,101 @@
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
+ *
+ * Written by Craig Edwards, Craig McLure, and others.
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
+using namespace std;
+
+#include <stdio.h>
+#include "users.h"
+#include "channels.h"
+#include "modules.h"
+
+/* $ModDesc: Povides a proof-of-concept test /WOOT command */
+
+static Server *Srv;
+
+enum HttpState
+{
+ HTTP_LISTEN = 0,
+ HTTP_SERVE = 1
+};
+
+class HttpSocket : public InspSocket
+{
+ public:
+
+ HttpSocket(std::string host, int port, bool listening, unsigned long maxtime) : InspSocket(host, port, listening, maxtime)
+ {
+ }
+
+ HttpSocket(int newfd, char* ip) : InspSocket(newfd, ip)
+ {
+ }
+};
+
+class ModuleHttp : public Module
+{
+ public:
+
+ void ReadConfig()
+ {
+ ConfigReader c;
+ }
+
+ ModuleHttp(Server* Me)
+ : Module::Module(Me)
+ {
+ ReadConfig();
+ }
+
+ void Implements(char* List)
+ {
+ List[I_OnEvent] = List[I_OnRequest] = 1;
+ }
+
+ virtual ~ModuleHttp()
+ {
+ }
+
+ virtual Version GetVersion()
+ {
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
+ }
+};
+
+
+class ModuleHttpFactory : public ModuleFactory
+{
+ public:
+ ModuleHttpFactory()
+ {
+ }
+
+ ~ModuleHttpFactory()
+ {
+ }
+
+ virtual Module * CreateModule(Server* Me)
+ {
+ return new ModuleHttp(Me);
+ }
+
+};
+
+
+extern "C" void * init_module( void )
+{
+ return new ModuleHttpFactory;
+}
+