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

ModuleXLineDB Class Reference

Inheritance diagram for ModuleXLineDB:

Inheritance graph
[legend]
Collaboration diagram for ModuleXLineDB:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleXLineDB (InspIRCd *Me)
virtual ~ModuleXLineDB ()
void OnAddLine (User *source, XLine *line)
 Called whenever an xline is added by a local user.
void OnDelLine (User *source, XLine *line)
 Called whenever an xline is deleted.
void OnExpireLine (XLine *line)
 Called whenever an xline expires.
void RemoveLine (XLine *line)
bool WriteDatabase ()
bool ReadDatabase ()
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Attributes

std::vector< XLine * > xlines
bool reading_db

Detailed Description

Definition at line 19 of file m_xline_db.cpp.


Constructor & Destructor Documentation

ModuleXLineDB::ModuleXLineDB InspIRCd Me  )  [inline]
 

Definition at line 25 of file m_xline_db.cpp.

References ModuleManager::Attach(), I_OnAddLine, I_OnDelLine, I_OnExpireLine, InspIRCd::Modules, ReadDatabase(), reading_db, and Module::ServerInstance.

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

Definition at line 35 of file m_xline_db.cpp.


Member Function Documentation

virtual Version ModuleXLineDB::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 240 of file m_xline_db.cpp.

References API_VERSION, and VF_VENDOR.

void ModuleXLineDB::OnAddLine User source,
XLine line
[inline, virtual]
 

Called whenever an xline is added by a local user.

This method is triggered after the line is added.

Parameters:
source The sender of the line or NULL for local server
line The xline being added

Reimplemented from Module.

Definition at line 44 of file m_xline_db.cpp.

References DEBUG, LogManager::Log(), InspIRCd::Logs, reading_db, Module::ServerInstance, WriteDatabase(), and xlines.

void ModuleXLineDB::OnDelLine User source,
XLine line
[inline, virtual]
 

Called whenever an xline is deleted.

This method is triggered after the line is deleted.

Parameters:
source The user removing the line or NULL for local server
line the line being deleted

Reimplemented from Module.

Definition at line 60 of file m_xline_db.cpp.

References RemoveLine().

void ModuleXLineDB::OnExpireLine XLine line  )  [inline, virtual]
 

Called whenever an xline expires.

This method is triggered after the line is deleted.

Parameters:
line The line being deleted.

Reimplemented from Module.

Definition at line 65 of file m_xline_db.cpp.

References RemoveLine().

bool ModuleXLineDB::ReadDatabase  )  [inline]
 

Definition at line 147 of file m_xline_db.cpp.

References XLineManager::AddLine(), DEBUG, XLineFactory::Generate(), XLineManager::GetFactory(), irc::tokenstream::GetToken(), LogManager::Log(), InspIRCd::Logs, MAXBUF, MAXPARAMETERS, Module::ServerInstance, XLine::SetCreateTime(), InspIRCd::SNO, InspIRCd::Time(), SnomaskManager::WriteToSnoMask(), and InspIRCd::XLines.

Referenced by ModuleXLineDB().

void ModuleXLineDB::RemoveLine XLine line  )  [inline]
 

Definition at line 70 of file m_xline_db.cpp.

References DEBUG, LogManager::Log(), InspIRCd::Logs, Module::ServerInstance, WriteDatabase(), and xlines.

Referenced by OnDelLine(), and OnExpireLine().

bool ModuleXLineDB::WriteDatabase  )  [inline]
 

Definition at line 85 of file m_xline_db.cpp.

References InspIRCd::Config, DEBUG, XLine::Displayable(), XLine::duration, LogManager::Log(), InspIRCd::Logs, XLine::reason, Module::ServerInstance, ServerConfig::ServerName, XLine::set_time, InspIRCd::SNO, XLine::type, SnomaskManager::WriteToSnoMask(), and xlines.

Referenced by OnAddLine(), and RemoveLine().


Member Data Documentation

bool ModuleXLineDB::reading_db [private]
 

Definition at line 22 of file m_xline_db.cpp.

Referenced by ModuleXLineDB(), and OnAddLine().

std::vector<XLine *> ModuleXLineDB::xlines [private]
 

Definition at line 21 of file m_xline_db.cpp.

Referenced by OnAddLine(), RemoveLine(), and WriteDatabase().


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