The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

ModuleHTTPAccessList Class Reference

Inheritance diagram for ModuleHTTPAccessList:

Inheritance graph
[legend]
Collaboration diagram for ModuleHTTPAccessList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void ReadConfig ()
 ModuleHTTPAccessList (InspIRCd *Me)
void BlockAccess (HTTPRequest *http, Event *event, int returnval, const std::string &extraheaderkey="", const std::string &extraheaderval="")
bool IsBase64 (unsigned char c)
std::string Base64Decode (const std::string &base64)
void OnEvent (Event *event)
 Called whenever an Event class is sent to all module by another module.
const char * OnRequest (Request *request)
 Called whenever a Request class is sent to your module by another module.
virtual ~ModuleHTTPAccessList ()
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Attributes

std::string stylesheet
bool changed
std::vector< HTTPACLacl_list

Detailed Description

Definition at line 39 of file m_httpd_acl.cpp.


Constructor & Destructor Documentation

ModuleHTTPAccessList::ModuleHTTPAccessList InspIRCd Me  )  [inline]
 

Definition at line 92 of file m_httpd_acl.cpp.

References ModuleManager::Attach(), I_OnEvent, I_OnRequest, InspIRCd::Modules, ReadConfig(), and Module::ServerInstance.

virtual ModuleHTTPAccessList::~ModuleHTTPAccessList  )  [inline, virtual]
 

Definition at line 282 of file m_httpd_acl.cpp.


Member Function Documentation

std::string ModuleHTTPAccessList::Base64Decode const std::string base64  )  [inline]
 

Definition at line 117 of file m_httpd_acl.cpp.

References IsBase64().

Referenced by OnEvent().

void ModuleHTTPAccessList::BlockAccess HTTPRequest http,
Event event,
int  returnval,
const std::string extraheaderkey = "",
const std::string extraheaderval = ""
[inline]
 

Definition at line 99 of file m_httpd_acl.cpp.

References DEBUG, Event::GetSource(), HTTPDocument::headers, LogManager::Log(), InspIRCd::Logs, Request::Send(), Module::ServerInstance, HTTPHeaders::SetHeader(), and HTTPRequest::sock.

Referenced by OnEvent().

virtual Version ModuleHTTPAccessList::GetVersion  )  [inline, virtual]
 

Returns the version number of a Module.

The method should return a Version object with its version information assigned via Version::Version

Reimplemented from Module.

Definition at line 286 of file m_httpd_acl.cpp.

References API_VERSION, and VF_VENDOR.

bool ModuleHTTPAccessList::IsBase64 unsigned char  c  )  [inline]
 

Definition at line 112 of file m_httpd_acl.cpp.

Referenced by Base64Decode().

void ModuleHTTPAccessList::OnEvent Event event  )  [inline, virtual]
 

Called whenever an Event class is sent to all module by another module.

Please see the documentation of Event::Send() for further information. The Event sent can always be assumed to be non-NULL, you should *always* check the value of Event::GetEventID() before doing anything to the event data, and you should *not* change the event data in any way!

Parameters:
event The Event class being received

Reimplemented from Module.

Definition at line 167 of file m_httpd_acl.cpp.

References acl_list, Base64Decode(), BlockAccess(), DEBUG, Event::GetData(), Event::GetEventID(), HTTPHeaders::GetHeader(), HTTPRequest::GetIP(), irc::sepstream::GetToken(), HTTPRequest::GetURI(), HTTPRequest::headers, HTTPHeaders::IsSet(), LogManager::Log(), InspIRCd::Logs, match(), and Module::ServerInstance.

const char* ModuleHTTPAccessList::OnRequest Request request  )  [inline, virtual]
 

Called whenever a Request class is sent to your module by another module.

Please see the documentation of Request::Send() for further information. The Request sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).

Parameters:
request The Request class being received

Reimplemented from Module.

Definition at line 277 of file m_httpd_acl.cpp.

void ModuleHTTPAccessList::ReadConfig  )  [inline]
 

Definition at line 48 of file m_httpd_acl.cpp.

References acl_list, DEBUG, LogManager::Log(), InspIRCd::Logs, and Module::ServerInstance.

Referenced by ModuleHTTPAccessList().


Member Data Documentation

std::vector<HTTPACL> ModuleHTTPAccessList::acl_list [private]
 

Definition at line 44 of file m_httpd_acl.cpp.

Referenced by OnEvent(), and ReadConfig().

bool ModuleHTTPAccessList::changed [private]
 

Definition at line 43 of file m_httpd_acl.cpp.

std::string ModuleHTTPAccessList::stylesheet [private]
 

Definition at line 42 of file m_httpd_acl.cpp.


The documentation for this class was generated from the following file: