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

ModuleOperLevels Class Reference

Inheritance diagram for ModuleOperLevels:

Inheritance graph
[legend]
Collaboration diagram for ModuleOperLevels:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleOperLevels (InspIRCd *Me)
virtual ~ModuleOperLevels ()
virtual void OnRehash (User *user, const std::string &parameter)
 Called on rehash.
virtual Version GetVersion ()
 Returns the version number of a Module.
virtual int OnKill (User *source, User *dest, const std::string &reason)
 Called when a client is disconnected by KILL.

Private Attributes

ConfigReaderconf

Detailed Description

Definition at line 17 of file m_operlevels.cpp.


Constructor & Destructor Documentation

ModuleOperLevels::ModuleOperLevels InspIRCd Me  )  [inline]
 

Definition at line 22 of file m_operlevels.cpp.

References ModuleManager::Attach(), conf, I_OnKill, I_OnRehash, InspIRCd::Modules, and Module::ServerInstance.

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

Definition at line 30 of file m_operlevels.cpp.

References conf.


Member Function Documentation

virtual Version ModuleOperLevels::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 42 of file m_operlevels.cpp.

References API_VERSION, and VF_VENDOR.

virtual int ModuleOperLevels::OnKill User source,
User dest,
const std::string reason
[inline, virtual]
 

Called when a client is disconnected by KILL.

If a client is killed by a server, e.g. a nickname collision or protocol error, source is NULL. Return 1 from this function to prevent the kill, and 0 from this function to allow it as normal. If you prevent the kill no output will be sent to the client, it is down to your module to generate this information. NOTE: It is NOT advisable to stop kills which originate from servers or remote users. If you do so youre risking race conditions, desyncs and worse!

Parameters:
source The user sending the KILL
dest The user being killed
reason The kill reason
Returns:
1 to prevent the kill, 0 to allow

Reimplemented from Module.

Definition at line 47 of file m_operlevels.cpp.

References conf, ERR_NOPRIVILEGES, IS_OPER, User::nick, User::oper, ConfigReader::ReadInteger(), ConfigReader::ReadValue(), Module::ServerInstance, InspIRCd::SNO, User::WriteNumeric(), User::WriteServ(), and SnomaskManager::WriteToSnoMask().

virtual void ModuleOperLevels::OnRehash User user,
const std::string parameter
[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 36 of file m_operlevels.cpp.

References conf, and Module::ServerInstance.


Member Data Documentation

ConfigReader* ModuleOperLevels::conf [private]
 

Definition at line 20 of file m_operlevels.cpp.

Referenced by ModuleOperLevels(), OnKill(), OnRehash(), and ~ModuleOperLevels().


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