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

ModuleLockserv Class Reference

Inheritance diagram for ModuleLockserv:

Inheritance graph
[legend]
Collaboration diagram for ModuleLockserv:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleLockserv (InspIRCd *Me)
virtual ~ModuleLockserv ()
virtual void OnRehash (User *user, const std::string &parameter)
 Called on rehash.
virtual int OnUserRegister (User *user)
 Called whenever a user is about to register their connection (e.g.
virtual bool OnCheckReady (User *user)
 Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true.
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Member Functions

virtual void ResetLocked ()

Private Attributes

bool locked
CommandLockservlockcommand
CommandUnlockservunlockcommand

Detailed Description

Definition at line 70 of file m_lockserv.cpp.


Constructor & Destructor Documentation

ModuleLockserv::ModuleLockserv InspIRCd Me  )  [inline]
 

Definition at line 83 of file m_lockserv.cpp.

References InspIRCd::AddCommand(), ModuleManager::Attach(), I_OnCheckReady, I_OnRehash, I_OnUserRegister, lockcommand, locked, InspIRCd::Modules, ResetLocked(), Module::ServerInstance, and unlockcommand.

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

Definition at line 95 of file m_lockserv.cpp.


Member Function Documentation

virtual Version ModuleLockserv::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 120 of file m_lockserv.cpp.

References API_VERSION, and VF_VENDOR.

virtual bool ModuleLockserv::OnCheckReady User user  )  [inline, virtual]
 

Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true.

For example a module which implements ident lookups will continue to return false for a user until their ident lookup is completed. Note that the registration timeout for a user overrides these checks, if the registration timeout is reached, the user is disconnected even if modules report that the user is not ready to connect.

Parameters:
user The user to check
Returns:
true to indicate readiness, false if otherwise

Reimplemented from Module.

Definition at line 115 of file m_lockserv.cpp.

References locked.

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

References ResetLocked().

virtual int ModuleLockserv::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 105 of file m_lockserv.cpp.

References locked, UserManager::QuitUser(), Module::ServerInstance, and InspIRCd::Users.

virtual void ModuleLockserv::ResetLocked  )  [inline, private, virtual]
 

Definition at line 77 of file m_lockserv.cpp.

References locked.

Referenced by ModuleLockserv(), and OnRehash().


Member Data Documentation

CommandLockserv* ModuleLockserv::lockcommand [private]
 

Definition at line 74 of file m_lockserv.cpp.

Referenced by ModuleLockserv().

bool ModuleLockserv::locked [private]
 

Definition at line 73 of file m_lockserv.cpp.

Referenced by ModuleLockserv(), OnCheckReady(), OnUserRegister(), and ResetLocked().

CommandUnlockserv* ModuleLockserv::unlockcommand [private]
 

Definition at line 75 of file m_lockserv.cpp.

Referenced by ModuleLockserv().


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