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

ModuleChanLog Class Reference

Inheritance diagram for ModuleChanLog:

Inheritance graph
[legend]
Collaboration diagram for ModuleChanLog:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleChanLog (InspIRCd *Me)
virtual ~ModuleChanLog ()
virtual void OnRehash (User *user, const std::string &parameter)
 Called on rehash.
virtual int OnSendSnotice (char &sno, std::string &desc, const std::string &msg)
 Called whenever a snotice is about to be sent to a snomask.
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Attributes

std::multimap< char, std::stringlogstreams

Detailed Description

Definition at line 18 of file m_chanlog.cpp.


Constructor & Destructor Documentation

ModuleChanLog::ModuleChanLog InspIRCd Me  )  [inline]
 

Definition at line 27 of file m_chanlog.cpp.

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

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

Definition at line 35 of file m_chanlog.cpp.


Member Function Documentation

virtual Version ModuleChanLog::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 98 of file m_chanlog.cpp.

References API_VERSION, and VF_VENDOR.

virtual void ModuleChanLog::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 39 of file m_chanlog.cpp.

References DEFAULT, ConfigReader::Enumerate(), LogManager::Log(), InspIRCd::Logs, logstreams, ConfigReader::ReadValue(), and Module::ServerInstance.

Referenced by ModuleChanLog().

virtual int ModuleChanLog::OnSendSnotice char &  sno,
std::string desc,
const std::string msg
[inline, virtual]
 

Called whenever a snotice is about to be sent to a snomask.

snomask and type may both be modified; the message may not.

Parameters:
snomask The snomask the message is going to (e.g. 'A')
type The textual description the snomask will go to (e.g. 'OPER')
message The text message to be sent via snotice
Returns:
1 to block the snotice from being sent entirely, 0 else.

Reimplemented from Module.

Definition at line 67 of file m_chanlog.cpp.

References InspIRCd::Config, InspIRCd::FindChan(), logstreams, MAXBUF, Channel::name, InspIRCd::PI, ProtocolInterface::SendChannelPrivmsg(), Module::ServerInstance, ServerConfig::ServerName, and Channel::WriteChannelWithServ().


Member Data Documentation

std::multimap<char, std::string> ModuleChanLog::logstreams [private]
 

Definition at line 24 of file m_chanlog.cpp.

Referenced by OnRehash(), and OnSendSnotice().


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