1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
23 #include "inspsocket.h"
24 #include "helperfuncs.h"
27 /* $ModDesc: Provides statistics over HTTP via m_httpd.so */
29 class ModuleHttpStats : public Module
34 std::string indexfile;
46 ModuleHttpStats(Server* Me) : Module::Module(Me)
52 void OnEvent(Event* event)
54 if (event->GetID() == "httpd_url")
56 log(DEBUG,"HTTP URL!");
60 char* OnRequest(Request* request)
65 void Implements(char* List)
67 List[I_OnEvent] = List[I_OnRequest] = 1;
70 virtual ~ModuleHttpStats()
75 virtual Version GetVersion()
77 return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
82 class ModuleHttpStatsFactory : public ModuleFactory
85 ModuleHttpStatsFactory()
89 ~ModuleHttpStatsFactory()
93 virtual Module * CreateModule(Server* Me)
95 return new ModuleHttpStats(Me);
100 extern "C" void * init_module( void )
102 return new ModuleHttpStatsFactory;