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

ModuleInviteException Class Reference

Inheritance diagram for ModuleInviteException:

Inheritance graph
[legend]
Collaboration diagram for ModuleInviteException:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleInviteException (InspIRCd *Me)
virtual void On005Numeric (std::string &output)
 Called when a 005 numeric is about to be output.
virtual int OnCheckInvite (User *user, Channel *chan)
 Called whenever a user joins a channel, to determine if invite checks should go ahead or not.
virtual const char * OnRequest (Request *request)
 Called whenever a Request class is sent to your module by another module.
virtual void OnCleanup (int target_type, void *item)
 Called before your module is unloaded to clean up Extensibles.
virtual void OnSyncChannel (Channel *chan, Module *proto, void *opaque)
 Allows modules to synchronize data which relates to channels during a netburst.
virtual void OnChannelDelete (Channel *chan)
 Called whenever a channel is deleted, either by QUIT, KICK or PART.
virtual void OnRehash (User *user, const std::string &param)
 Called on rehash.
virtual Version GetVersion ()
 Returns the version number of a Module.
 ~ModuleInviteException ()

Private Attributes

InviteExceptionie

Detailed Description

Definition at line 40 of file m_inviteexception.cpp.


Constructor & Destructor Documentation

ModuleInviteException::ModuleInviteException InspIRCd Me  )  [inline]
 

Definition at line 44 of file m_inviteexception.cpp.

References ModeParser::AddMode(), ModuleManager::Attach(), ListModeBase::DoImplements(), I_On005Numeric, I_OnCheckInvite, I_OnRequest, ie, InspIRCd::Modes, InspIRCd::Modules, and ModuleManager::PublishInterface().

ModuleInviteException::~ModuleInviteException  )  [inline]
 

Definition at line 115 of file m_inviteexception.cpp.

References ModeParser::DelMode(), ie, InspIRCd::Modes, InspIRCd::Modules, and ModuleManager::UnpublishInterface().


Member Function Documentation

virtual Version ModuleInviteException::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 110 of file m_inviteexception.cpp.

References API_VERSION, VF_COMMON, and VF_VENDOR.

virtual void ModuleInviteException::On005Numeric std::string output  )  [inline, virtual]
 

Called when a 005 numeric is about to be output.

The module should modify the 005 numeric if needed to indicate its features.

Parameters:
output The 005 string to be modified if neccessary.

Reimplemented from Module.

Definition at line 56 of file m_inviteexception.cpp.

virtual void ModuleInviteException::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 100 of file m_inviteexception.cpp.

References ListModeBase::DoChannelDelete(), and ie.

virtual int ModuleInviteException::OnCheckInvite User user,
Channel chan
[inline, virtual]
 

Called whenever a user joins a channel, to determine if invite checks should go ahead or not.

This method will always be called for each join, wether or not the channel is actually +i, and determines the outcome of an if statement around the whole section of invite checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.

Parameters:
user The user joining the channel
chan The channel being joined
Returns:
1 to explicitly allow the join, 0 to proceed as normal

Reimplemented from Module.

Definition at line 61 of file m_inviteexception.cpp.

References Extensible::GetExt(), User::GetFullHost(), User::GetFullRealHost(), ListModeBase::GetInfoKey(), User::GetIPString(), User::ident, ie, InspIRCd::Match(), InspIRCd::MatchCIDR(), and User::nick.

virtual void ModuleInviteException::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 90 of file m_inviteexception.cpp.

References ListModeBase::DoCleanup(), and ie.

virtual void ModuleInviteException::OnRehash User user,
const std::string param
[inline, virtual]
 

Called on rehash.

This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application. If a parameter is given, the core has done nothing. The module receiving the event can decide if this parameter has any relevence to it.

Parameters:
user The user performing the rehash, if any -- if this is server initiated, the value of this variable will be NULL.
parameter The (optional) parameter given to REHASH from the user.

Reimplemented from Module.

Definition at line 105 of file m_inviteexception.cpp.

References ListModeBase::DoRehash(), and ie.

virtual const char* ModuleInviteException::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 85 of file m_inviteexception.cpp.

References ListModeBase::DoOnRequest(), and ie.

virtual void ModuleInviteException::OnSyncChannel Channel chan,
Module proto,
void *  opaque
[inline, virtual]
 

Allows modules to synchronize data which relates to channels during a netburst.

When this function is called, it will be called from the module which implements the linking protocol. This currently is m_spanningtree.so. A pointer to this module is given in Module* proto, so that you may call its methods such as ProtoSendMode (see below). This function will be called for every user visible on your side of the burst, allowing you to for example set modes, etc. Do not use this call to synchronize data which you have stored using class Extensible -- There is a specialist function OnSyncUserMetaData and OnSyncChannelMetaData for this!

For a good example of how to use this function, please see src/modules/m_chanprotect.cpp

Parameters:
chan The channel being syncronized
proto A pointer to the module handling network protocol
opaque An opaque pointer set by the protocol module, should not be modified!

Reimplemented from Module.

Definition at line 95 of file m_inviteexception.cpp.

References ListModeBase::DoSyncChannel(), and ie.


Member Data Documentation

InviteException* ModuleInviteException::ie [private]
 

Definition at line 42 of file m_inviteexception.cpp.

Referenced by ModuleInviteException(), OnChannelDelete(), OnCheckInvite(), OnCleanup(), OnRehash(), OnRequest(), OnSyncChannel(), and ~ModuleInviteException().


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