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

ModuleHostChange Class Reference

Inheritance diagram for ModuleHostChange:

Inheritance graph
[legend]
Collaboration diagram for ModuleHostChange:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleHostChange (InspIRCd *Me)
virtual ~ModuleHostChange ()
void Prioritize ()
virtual void OnRehash (User *user, const std::string &parameter)
 Called on rehash.
virtual Version GetVersion ()
 Returns the version number of a Module.
virtual void OnUserConnect (User *user)
 Called when a user connects.

Private Attributes

hostchanges_t hostchanges
std::string MySuffix
std::string MyPrefix
std::string MySeparator

Detailed Description

Definition at line 31 of file m_hostchange.cpp.


Constructor & Destructor Documentation

ModuleHostChange::ModuleHostChange InspIRCd Me  )  [inline]
 

Definition at line 40 of file m_hostchange.cpp.

References ModuleManager::Attach(), I_OnRehash, I_OnUserConnect, InspIRCd::Modules, OnRehash(), and Module::ServerInstance.

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

Definition at line 48 of file m_hostchange.cpp.

References hostchanges.


Member Function Documentation

virtual Version ModuleHostChange::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 89 of file m_hostchange.cpp.

References API_VERSION, and VF_VENDOR.

virtual void ModuleHostChange::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 64 of file m_hostchange.cpp.

References Host::action, Conf, ConfigReader::Enumerate(), hostchanges, MyPrefix, MySeparator, MySuffix, Host::newhost, Host::ports, ConfigReader::ReadValue(), and Module::ServerInstance.

Referenced by ModuleHostChange().

virtual void ModuleHostChange::OnUserConnect User user  )  [inline, virtual]
 

Called when a user connects.

The details of the connecting user are available to you in the parameter User *user

Parameters:
user The user who is connecting

Reimplemented from Module.

Definition at line 96 of file m_hostchange.cpp.

References Host::action, User::ChangeDisplayedHost(), User::GetPort(), irc::portparser::GetToken(), hostchanges, User::MakeHost(), User::MakeHostIP(), match(), MyPrefix, MySeparator, MySuffix, Host::newhost, User::nick, Host::ports, and User::WriteServ().

void ModuleHostChange::Prioritize  )  [inline, virtual]
 

Reimplemented from Module.

Definition at line 57 of file m_hostchange.cpp.

References ModuleManager::Find(), I_OnUserConnect, InspIRCd::Modules, PRIO_AFTER, Module::ServerInstance, and ModuleManager::SetPriority().


Member Data Documentation

hostchanges_t ModuleHostChange::hostchanges [private]
 

Definition at line 34 of file m_hostchange.cpp.

Referenced by OnRehash(), OnUserConnect(), and ~ModuleHostChange().

std::string ModuleHostChange::MyPrefix [private]
 

Definition at line 36 of file m_hostchange.cpp.

Referenced by OnRehash(), and OnUserConnect().

std::string ModuleHostChange::MySeparator [private]
 

Definition at line 37 of file m_hostchange.cpp.

Referenced by OnRehash(), and OnUserConnect().

std::string ModuleHostChange::MySuffix [private]
 

Definition at line 35 of file m_hostchange.cpp.

Referenced by OnRehash(), and OnUserConnect().


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