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

ModuleSQLutils Class Reference

Inheritance diagram for ModuleSQLutils:

Inheritance graph
[legend]
Collaboration diagram for ModuleSQLutils:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleSQLutils (InspIRCd *Me)
virtual ~ModuleSQLutils ()
virtual const char * OnRequest (Request *request)
 Called whenever a Request class is sent to your module by another module.
virtual void OnUserDisconnect (User *user)
 Called whenever a user's socket is closed.
void AttachList (Extensible *obj, unsigned long id)
void RemoveFromList (Extensible *obj, unsigned long id)
template<class T>
void DoUnAssociate (T &map, unsigned long id)
virtual void OnChannelDelete (Channel *chan)
 Called whenever a channel is deleted, either by QUIT, KICK or PART.
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Attributes

IdUserMap iduser
IdChanMap idchan

Detailed Description

Definition at line 26 of file m_sqlutils.cpp.


Constructor & Destructor Documentation

ModuleSQLutils::ModuleSQLutils InspIRCd Me  )  [inline]
 

Definition at line 33 of file m_sqlutils.cpp.

References ModuleManager::Attach(), I_OnChannelDelete, I_OnRequest, I_OnUnloadModule, I_OnUserDisconnect, InspIRCd::Modules, ModuleManager::PublishInterface(), and Module::ServerInstance.

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

Definition at line 41 of file m_sqlutils.cpp.

References InspIRCd::Modules, Module::ServerInstance, and ModuleManager::UnpublishInterface().


Member Function Documentation

void ModuleSQLutils::AttachList Extensible obj,
unsigned long  id
[inline]
 

Definition at line 138 of file m_sqlutils.cpp.

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

Referenced by OnRequest().

template<class T>
void ModuleSQLutils::DoUnAssociate T &  map,
unsigned long  id
[inline]
 

Definition at line 171 of file m_sqlutils.cpp.

References RemoveFromList().

Referenced by OnRequest().

virtual Version ModuleSQLutils::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 224 of file m_sqlutils.cpp.

References API_VERSION, VF_SERVICEPROVIDER, and VF_VENDOR.

virtual void ModuleSQLutils::OnChannelDelete Channel chan  )  [inline, virtual]
 

Called whenever a channel is deleted, either by QUIT, KICK or PART.

Parameters:
chan The channel being deleted

Reimplemented from Module.

Definition at line 189 of file m_sqlutils.cpp.

References DEBUG, Extensible::GetExt(), idchan, LogManager::Log(), InspIRCd::Logs, Channel::name, Module::ServerInstance, and Extensible::Shrink().

virtual const char* ModuleSQLutils::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 47 of file m_sqlutils.cpp.

References AttachList(), GetAssocChan::chan, AssociateChan::chan, DoUnAssociate(), Request::GetId(), GetAssocChan::id, GetAssocUser::id, UnAssociate::id, AssociateChan::id, AssociateUser::id, idchan, iduser, SQLUTILAC, SQLUTILAU, SQLUTILGC, SQLUTILGU, SQLUTILSUCCESS, SQLUTILUA, GetAssocUser::user, and AssociateUser::user.

virtual void ModuleSQLutils::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 102 of file m_sqlutils.cpp.

References DEBUG, Extensible::GetExt(), iduser, LogManager::Log(), InspIRCd::Logs, User::nick, Module::ServerInstance, and Extensible::Shrink().

void ModuleSQLutils::RemoveFromList Extensible obj,
unsigned long  id
[inline]
 

Definition at line 153 of file m_sqlutils.cpp.

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

Referenced by DoUnAssociate().


Member Data Documentation

IdChanMap ModuleSQLutils::idchan [private]
 

Definition at line 30 of file m_sqlutils.cpp.

Referenced by OnChannelDelete(), and OnRequest().

IdUserMap ModuleSQLutils::iduser [private]
 

Definition at line 29 of file m_sqlutils.cpp.

Referenced by OnRequest(), and OnUserDisconnect().


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