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

ModuleNoKicks Class Reference

Inheritance diagram for ModuleNoKicks:

Inheritance graph
[legend]
Collaboration diagram for ModuleNoKicks:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleNoKicks (InspIRCd *Me)
virtual void On005Numeric (std::string &output)
 Called when a 005 numeric is about to be output.
virtual int OnAccessCheck (User *source, User *dest, Channel *channel, int access_type)
 Called before an action which requires a channel privilage check.
virtual ~ModuleNoKicks ()
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Attributes

NoKicksnk

Detailed Description

Definition at line 24 of file m_nokicks.cpp.


Constructor & Destructor Documentation

ModuleNoKicks::ModuleNoKicks InspIRCd Me  )  [inline]
 

Definition at line 29 of file m_nokicks.cpp.

References ModeParser::AddMode(), ModuleManager::Attach(), I_On005Numeric, I_OnAccessCheck, InspIRCd::Modes, InspIRCd::Modules, nk, and Module::ServerInstance.

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

Definition at line 66 of file m_nokicks.cpp.

References ModeParser::DelMode(), InspIRCd::Modes, nk, and Module::ServerInstance.


Member Function Documentation

virtual Version ModuleNoKicks::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 72 of file m_nokicks.cpp.

References API_VERSION, VF_COMMON, and VF_VENDOR.

virtual void ModuleNoKicks::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 39 of file m_nokicks.cpp.

References InspIRCd::AddExtBanChar(), and Module::ServerInstance.

virtual int ModuleNoKicks::OnAccessCheck User source,
User dest,
Channel channel,
int  access_type
[inline, virtual]
 

Called before an action which requires a channel privilage check.

This function is called before many functions which check a users status on a channel, for example before opping a user, deopping a user, kicking a user, etc. There are several values for access_type which indicate for what reason access is being checked. These are:

AC_KICK (0) - A user is being kicked
AC_DEOP (1) - a user is being deopped
AC_OP (2) - a user is being opped
AC_VOICE (3) - a user is being voiced
AC_DEVOICE (4) - a user is being devoiced
AC_HALFOP (5) - a user is being halfopped
AC_DEHALFOP (6) - a user is being dehalfopped
AC_INVITE () - a user is being invited
AC_GENERAL_MODE (8) - a user channel mode is being changed<br>
Upon returning from your function you must return either ACR_DEFAULT, to indicate the module wishes to do nothing, or ACR_DENY where approprate to deny the action, and ACR_ALLOW where appropriate to allow the action. Please note that in the case of some access checks (such as AC_GENERAL_MODE) access may be denied 'upstream' causing other checks such as AC_DEOP to not be reached. Be very careful with use of the AC_GENERAL_MODE type, as it may inadvertently override the behaviour of other modules. When the access_type is AC_GENERAL_MODE, the destination of the mode will be NULL (as it has not yet been determined).

Parameters:
source The source of the access check
dest The destination of the access check
channel The channel which is being checked
access_type See above

Reimplemented from Module.

Definition at line 44 of file m_nokicks.cpp.

References AC_KICK, ACR_ALLOW, ACR_DEFAULT, ACR_DENY, ERR_CHANOPRIVSNEEDED, Channel::IsExtBanned(), Channel::IsModeSet(), Channel::name, User::nick, Module::ServerInstance, and InspIRCd::ULine().


Member Data Documentation

NoKicks* ModuleNoKicks::nk [private]
 

Definition at line 26 of file m_nokicks.cpp.

Referenced by ModuleNoKicks(), and ~ModuleNoKicks().


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