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

ModuleRLine Class Reference

Inheritance diagram for ModuleRLine:

Inheritance graph
[legend]
Collaboration diagram for ModuleRLine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleRLine (InspIRCd *Me)
virtual ~ModuleRLine ()
virtual Version GetVersion ()
 Returns the version number of a Module.
virtual void OnUserConnect (User *user)
 Called when a user connects.
virtual void OnRehash (User *user, const std::string &parameter)
 Called on rehash.
virtual int OnStats (char symbol, User *user, string_list &results)
 Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core.
virtual void OnLoadModule (Module *mod, const std::string &name)
 Called whenever a module is loaded.
virtual void OnUserPostNick (User *user, const std::string &oldnick)
 Called after any nickchange, local or remote.

Private Attributes

CommandRLiner
RLineFactoryf
bool MatchOnNickChange
std::string RegexEngine

Detailed Description

Definition at line 183 of file m_rline.cpp.


Constructor & Destructor Documentation

ModuleRLine::ModuleRLine InspIRCd Me  )  [inline]
 

Definition at line 192 of file m_rline.cpp.

References InspIRCd::AddCommand(), ModuleManager::Attach(), f, I_OnLoadModule, I_OnRehash, I_OnStats, I_OnUserConnect, I_OnUserPostNick, InspIRCd::Modules, OnRehash(), r, XLineManager::RegisterFactory(), Module::ServerInstance, ModuleManager::UseInterface(), and InspIRCd::XLines.

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

Definition at line 211 of file m_rline.cpp.

References XLineManager::DelAll(), ModuleManager::DoneWithInterface(), f, InspIRCd::Modules, Module::ServerInstance, XLineManager::UnregisterFactory(), and InspIRCd::XLines.


Member Function Documentation

virtual Version ModuleRLine::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 218 of file m_rline.cpp.

References API_VERSION, VF_COMMON, and VF_VENDOR.

virtual void ModuleRLine::OnLoadModule Module mod,
const std::string name
[inline, virtual]
 

Called whenever a module is loaded.

mod will contain a pointer to the module, and string will contain its name, for example m_widgets.so. This function is primary for dependency checking, your module may decide to enable some extra features if it sees that you have for example loaded "m_killwidgets.so" with "m_makewidgets.so". It is highly recommended that modules do *NOT* bail if they cannot satisfy dependencies, but instead operate under reduced functionality, unless the dependency is absolutely neccessary (e.g. a module that extends the features of another module).

Parameters:
mod A pointer to the new module
name The new module's filename

Reimplemented from Module.

Definition at line 279 of file m_rline.cpp.

References ModuleManager::ModuleHasInterface(), InspIRCd::Modules, RegexEngine, Module::ServerInstance, InspIRCd::SNO, and SnomaskManager::WriteToSnoMask().

virtual void ModuleRLine::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 235 of file m_rline.cpp.

References Conf, XLineManager::DelAll(), ModuleManager::FindInterface(), MatchOnNickChange, InspIRCd::Modules, ConfigReader::ReadFlag(), ConfigReader::ReadValue(), RegexEngine, Module::ServerInstance, InspIRCd::SNO, SnomaskManager::WriteToSnoMask(), and InspIRCd::XLines.

Referenced by ModuleRLine().

virtual int ModuleRLine::OnStats char  symbol,
User user,
string_list results
[inline, virtual]
 

Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core.

Parameters:
symbol the symbol provided to /STATS
user the user issuing the /STATS command
results A string_list to append results into. You should put all your results into this string_list, rather than displaying them directly, so that your handler will work when remote STATS queries are received.
Returns:
1 to block the /STATS from being processed by the core, 0 to allow it

Reimplemented from Module.

Definition at line 270 of file m_rline.cpp.

References XLineManager::InvokeStats(), Module::ServerInstance, and InspIRCd::XLines.

virtual void ModuleRLine::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 223 of file m_rline.cpp.

References XLine::Apply(), XLineManager::MatchesLine(), Module::ServerInstance, and InspIRCd::XLines.

virtual void ModuleRLine::OnUserPostNick User user,
const std::string oldnick
[inline, virtual]
 

Called after any nickchange, local or remote.

This can be used to track users after nickchanges have been applied. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the User if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). Because this method is called after the nickchange is taken place, no return values are possible to indicate forbidding of the nick change. Use OnUserPreNick for this.

Parameters:
user The user changing their nick
oldnick The old nickname of the user before the nickchange

Reimplemented from Module.

Definition at line 292 of file m_rline.cpp.

References XLine::Apply(), IS_LOCAL, XLineManager::MatchesLine(), MatchOnNickChange, Module::ServerInstance, and InspIRCd::XLines.


Member Data Documentation

RLineFactory* ModuleRLine::f [private]
 

Definition at line 187 of file m_rline.cpp.

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

bool ModuleRLine::MatchOnNickChange [private]
 

Definition at line 188 of file m_rline.cpp.

Referenced by OnRehash(), and OnUserPostNick().

CommandRLine* ModuleRLine::r [private]
 

Definition at line 186 of file m_rline.cpp.

Referenced by ModuleRLine().

std::string ModuleRLine::RegexEngine [private]
 

Definition at line 189 of file m_rline.cpp.

Referenced by OnLoadModule(), and OnRehash().


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