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

ModuleSASL Class Reference

Inheritance diagram for ModuleSASL:

Inheritance graph
[legend]
Collaboration diagram for ModuleSASL:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleSASL (InspIRCd *Me)
virtual int OnUserRegister (User *user)
 Called whenever a user is about to register their connection (e.g.
virtual void OnCleanup (int target_type, void *item)
 Called before your module is unloaded to clean up Extensibles.
virtual void OnUserDisconnect (User *user)
 Called whenever a user's socket is closed.
virtual void OnPostConnect (User *user)
 Called after a user has fully connected and all modules have executed OnUserConnect This event is informational only.
virtual ~ModuleSASL ()
virtual Version GetVersion ()
 Returns the version number of a Module.
virtual void OnEvent (Event *ev)
 Called whenever an Event class is sent to all module by another module.

Private Attributes

CommandAuthenticatesasl

Detailed Description

Definition at line 187 of file m_sasl.cpp.


Constructor & Destructor Documentation

ModuleSASL::ModuleSASL InspIRCd Me  )  [inline]
 

Definition at line 192 of file m_sasl.cpp.

References InspIRCd::AddCommand(), ModuleManager::Attach(), DEFAULT, ModuleManager::Find(), I_OnCleanup, I_OnEvent, I_OnPostConnect, I_OnUserDisconnect, I_OnUserRegister, LogManager::Log(), InspIRCd::Logs, InspIRCd::Modules, sasl, and Module::ServerInstance.

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

Definition at line 247 of file m_sasl.cpp.


Member Function Documentation

virtual Version ModuleSASL::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 251 of file m_sasl.cpp.

References API_VERSION, and VF_VENDOR.

virtual void ModuleSASL::OnCleanup int  target_type,
void *  item
[inline, virtual]
 

Called before your module is unloaded to clean up Extensibles.

This method is called once for every user and channel on the network, so that when your module unloads it may clear up any remaining data in the form of Extensibles added using Extensible::Extend(). If the target_type variable is TYPE_USER, then void* item refers to a User*, otherwise it refers to a Channel*.

Parameters:
target_type The type of item being cleaned
item A pointer to the item's class

Reimplemented from Module.

Definition at line 218 of file m_sasl.cpp.

References OnUserDisconnect(), and TYPE_USER.

virtual void ModuleSASL::OnEvent Event ev  )  [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 256 of file m_sasl.cpp.

References DEBUG, InspIRCd::FindNick(), GenericCapHandler(), Event::GetData(), Event::GetEventID(), Extensible::GetExt(), LogManager::Log(), InspIRCd::Logs, SaslAuthenticator::ProcessInboundMessage(), SASL_DONE, Module::ServerInstance, and Extensible::Shrink().

virtual void ModuleSASL::OnPostConnect User user  )  [inline, virtual]
 

Called after a user has fully connected and all modules have executed OnUserConnect This event is informational only.

You should not change any user information in this event. To do so, use the OnUserConnect method to change the state of local users. This is called for both local and remote users.

Parameters:
user The user who is connecting

Reimplemented from Module.

Definition at line 234 of file m_sasl.cpp.

References Extensible::GetExt(), IS_LOCAL, InspIRCd::PI, ProtocolInterface::SendMetaData(), Module::ServerInstance, and TYPE_USER.

virtual void ModuleSASL::OnUserDisconnect User user  )  [inline, virtual]
 

Called whenever a user's socket is closed.

The details of the exiting user are available to you in the parameter User *user This event is called for all users, registered or not, as a cleanup method for modules which might assign resources to user, such as dns lookups, objects and sockets.

Parameters:
user The user who is disconnecting

Reimplemented from Module.

Definition at line 224 of file m_sasl.cpp.

References Extensible::GetExt(), and Extensible::Shrink().

Referenced by OnCleanup().

virtual int ModuleSASL::OnUserRegister User user  )  [inline, virtual]
 

Called whenever a user is about to register their connection (e.g.

before the user is sent the MOTD etc). Modules can use this method if they are performing a function which must be done before the actual connection is completed (e.g. ident lookups, dnsbl lookups, etc). Note that you should NOT delete the user record here by causing a disconnection! Use OnUserConnect for that instead.

Parameters:
user The user registering
Returns:
1 to indicate user quit, 0 to continue

Reimplemented from Module.

Definition at line 205 of file m_sasl.cpp.

References SaslAuthenticator::Abort(), Extensible::GetExt(), and Extensible::Shrink().


Member Data Documentation

CommandAuthenticate* ModuleSASL::sasl [private]
 

Definition at line 189 of file m_sasl.cpp.

Referenced by ModuleSASL().


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