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

ModuleCustomTitle Class Reference

Inheritance diagram for ModuleCustomTitle:

Inheritance graph
[legend]
Collaboration diagram for ModuleCustomTitle:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleCustomTitle (InspIRCd *Me)
int OnWhoisLine (User *user, User *dest, int &numeric, std::string &text)
 Called whenever a line of WHOIS output is sent to a user.
virtual void OnSyncUserMetaData (User *user, Module *proto, void *opaque, const std::string &extname, bool displayable)
virtual void OnUserQuit (User *user, const std::string &message, const std::string &oper_message)
 Called when a user quits.
virtual void OnCleanup (int target_type, void *item)
 Called before your module is unloaded to clean up Extensibles.
virtual void OnDecodeMetaData (int target_type, void *target, const std::string &extname, const std::string &extdata)
 Allows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module.
virtual ~ModuleCustomTitle ()
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Attributes

CommandTitlemycommand

Detailed Description

Definition at line 102 of file m_customtitle.cpp.


Constructor & Destructor Documentation

ModuleCustomTitle::ModuleCustomTitle InspIRCd Me  )  [inline]
 

Definition at line 107 of file m_customtitle.cpp.

References InspIRCd::AddCommand(), ModuleManager::Attach(), I_OnCleanup, I_OnDecodeMetaData, I_OnSyncUserMetaData, I_OnUserQuit, I_OnWhoisLine, InspIRCd::Modules, mycommand, and Module::ServerInstance.

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

Definition at line 204 of file m_customtitle.cpp.


Member Function Documentation

virtual Version ModuleCustomTitle::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 208 of file m_customtitle.cpp.

References API_VERSION, VF_COMMON, and VF_VENDOR.

virtual void ModuleCustomTitle::OnCleanup int  target_type,
void *  item
[inline, virtual]
 

Called before your module is unloaded to clean up Extensibles.

This method is called once for every user and channel on the network, so that when your module unloads it may clear up any remaining data in the form of Extensibles added using Extensible::Extend(). If the target_type variable is TYPE_USER, then void* item refers to a User*, otherwise it refers to a Channel*.

Parameters:
target_type The type of item being cleaned
item A pointer to the item's class

Reimplemented from Module.

Definition at line 167 of file m_customtitle.cpp.

References Extensible::GetExt(), Extensible::Shrink(), and TYPE_USER.

virtual void ModuleCustomTitle::OnDecodeMetaData int  target_type,
void *  target,
const std::string extname,
const std::string extdata
[inline, virtual]
 

Allows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module.

Please see src/modules/m_swhois.cpp for a working example of how to use this method call.

Parameters:
target_type The type of item to decode data for, TYPE_USER or TYPE_CHANNEL
target The Channel* or User* that data should be added to
extname The extension name which is being sent
extdata The extension data, encoded at the other end by an identical module through OnSyncChannelMetaData or OnSyncUserMetaData

Reimplemented from Module.

Definition at line 188 of file m_customtitle.cpp.

References Extensible::Extend(), Extensible::GetExt(), and TYPE_USER.

virtual void ModuleCustomTitle::OnSyncUserMetaData User user,
Module proto,
void *  opaque,
const std::string extname,
bool  displayable
[inline, virtual]
 

Reimplemented from Module.

Definition at line 139 of file m_customtitle.cpp.

References Extensible::GetExt(), Module::ProtoSendMetaData(), and TYPE_USER.

virtual void ModuleCustomTitle::OnUserQuit User user,
const std::string message,
const std::string oper_message
[inline, virtual]
 

Called when a user quits.

The details of the exiting user are available to you in the parameter User *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.

Parameters:
user The user who is quitting
message The user's quit message (as seen by non-opers)
oper_message The user's quit message (as seen by opers)

Reimplemented from Module.

Definition at line 156 of file m_customtitle.cpp.

References Extensible::GetExt(), and Extensible::Shrink().

int ModuleCustomTitle::OnWhoisLine User user,
User dest,
int &  numeric,
std::string text
[inline, virtual]
 

Called whenever a line of WHOIS output is sent to a user.

You may change the numeric and the text of the output by changing the values numeric and text, but you cannot change the user the numeric is sent to. You may however change the user's User values.

Parameters:
user The user the numeric is being sent to
dest The user being WHOISed
numeric The numeric of the line being sent
text The text of the numeric, including any parameters
Returns:
nonzero to drop the line completely so that the user does not receive it, or zero to allow the line to be sent.

Reimplemented from Module.

Definition at line 118 of file m_customtitle.cpp.

References Extensible::GetExt(), User::nick, InspIRCd::SendWhoisLine(), and Module::ServerInstance.


Member Data Documentation

CommandTitle* ModuleCustomTitle::mycommand [private]
 

Definition at line 104 of file m_customtitle.cpp.

Referenced by ModuleCustomTitle().


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